Tabnine Logo
Os.statvfs
Code IndexAdd Tabnine to your IDE (free)

How to use
statvfs
method
in
libcore.io.Os

Best Java code snippets using libcore.io.Os.statvfs (Showing top 20 results out of 315)

origin: robovm/robovm

/**
 * Returns the total size in bytes of the partition containing this path.
 * Returns 0 if this path does not exist.
 *
 * @since 1.6
 */
public long getTotalSpace() {
  try {
    StructStatVfs sb = Libcore.os.statvfs(path);
    return sb.f_blocks * sb.f_bsize; // total block count * block size in bytes.
  } catch (ErrnoException errnoException) {
    return 0;
  }
}
origin: robovm/robovm

public StructStatVfs statvfs(String path) throws ErrnoException { return os.statvfs(path); }
public String strerror(int errno) { return os.strerror(errno); }
origin: robovm/robovm

  /**
   * Returns the number of free bytes on the partition containing this path.
   * Returns 0 if this path does not exist.
   *
   * <p>Note that this is likely to be an optimistic over-estimate and should not
   * be taken as a guarantee your application can actually write this many bytes.
   *
   * @since 1.6
   */
  public long getFreeSpace() {
    try {
      StructStatVfs sb = Libcore.os.statvfs(path);
      return sb.f_bfree * sb.f_bsize; // free block count * block size in bytes.
    } catch (ErrnoException errnoException) {
      return 0;
    }
  }
}
origin: robovm/robovm

/**
 * Returns the number of usable free bytes on the partition containing this path.
 * Returns 0 if this path does not exist.
 *
 * <p>Note that this is likely to be an optimistic over-estimate and should not
 * be taken as a guarantee your application can actually write this many bytes.
 * On Android (and other Unix-based systems), this method returns the number of free bytes
 * available to non-root users, regardless of whether you're actually running as root,
 * and regardless of any quota or other restrictions that might apply to the user.
 * (The {@code getFreeSpace} method returns the number of bytes potentially available to root.)
 *
 * @since 1.6
 */
public long getUsableSpace() {
  try {
    StructStatVfs sb = Libcore.os.statvfs(path);
    return sb.f_bavail * sb.f_bsize; // non-root free block count * block size in bytes.
  } catch (ErrnoException errnoException) {
    return 0;
  }
}
origin: MobiVM/robovm

/**
 * Returns the total size in bytes of the partition containing this path.
 * Returns 0 if this path does not exist.
 *
 * @since 1.6
 */
public long getTotalSpace() {
  try {
    StructStatVfs sb = Libcore.os.statvfs(path);
    return sb.f_blocks * sb.f_bsize; // total block count * block size in bytes.
  } catch (ErrnoException errnoException) {
    return 0;
  }
}
origin: ibinti/bugvm

/**
 * Returns the total size in bytes of the partition containing this path.
 * Returns 0 if this path does not exist.
 *
 * @since 1.6
 */
public long getTotalSpace() {
  try {
    StructStatVfs sb = Libcore.os.statvfs(path);
    return sb.f_blocks * sb.f_bsize; // total block count * block size in bytes.
  } catch (ErrnoException errnoException) {
    return 0;
  }
}
origin: com.mobidevelop.robovm/robovm-rt

/**
 * Returns the total size in bytes of the partition containing this path.
 * Returns 0 if this path does not exist.
 *
 * @since 1.6
 */
public long getTotalSpace() {
  try {
    StructStatVfs sb = Libcore.os.statvfs(path);
    return sb.f_blocks * sb.f_bsize; // total block count * block size in bytes.
  } catch (ErrnoException errnoException) {
    return 0;
  }
}
origin: com.bugvm/bugvm-rt

/**
 * Returns the total size in bytes of the partition containing this path.
 * Returns 0 if this path does not exist.
 *
 * @since 1.6
 */
public long getTotalSpace() {
  try {
    StructStatVfs sb = Libcore.os.statvfs(path);
    return sb.f_blocks * sb.f_bsize; // total block count * block size in bytes.
  } catch (ErrnoException errnoException) {
    return 0;
  }
}
origin: MobiVM/robovm

public StructStatVfs statvfs(String path) throws ErrnoException { return os.statvfs(path); }
public String strerror(int errno) { return os.strerror(errno); }
origin: com.gluonhq/robovm-rt

/**
 * Returns the total size in bytes of the partition containing this path.
 * Returns 0 if this path does not exist.
 *
 * @since 1.6
 */
public long getTotalSpace() {
  try {
    StructStatVfs sb = Libcore.os.statvfs(path);
    return sb.f_blocks * sb.f_bsize; // total block count * block size in bytes.
  } catch (ErrnoException errnoException) {
    return 0;
  }
}
origin: ibinti/bugvm

public StructStatVfs statvfs(String path) throws ErrnoException { return os.statvfs(path); }
public String strerror(int errno) { return os.strerror(errno); }
origin: FlexoVM/flexovm

/**
 * Returns the total size in bytes of the partition containing this path.
 * Returns 0 if this path does not exist.
 *
 * @since 1.6
 */
public long getTotalSpace() {
  try {
    StructStatVfs sb = Libcore.os.statvfs(path);
    return sb.f_blocks * sb.f_bsize; // total block count * block size in bytes.
  } catch (ErrnoException errnoException) {
    return 0;
  }
}
origin: com.mobidevelop.robovm/robovm-rt

public StructStatVfs statvfs(String path) throws ErrnoException { return os.statvfs(path); }
public String strerror(int errno) { return os.strerror(errno); }
origin: com.gluonhq/robovm-rt

public StructStatVfs statvfs(String path) throws ErrnoException { return os.statvfs(path); }
public String strerror(int errno) { return os.strerror(errno); }
origin: MobiVM/robovm

  /**
   * Returns the number of free bytes on the partition containing this path.
   * Returns 0 if this path does not exist.
   *
   * <p>Note that this is likely to be an optimistic over-estimate and should not
   * be taken as a guarantee your application can actually write this many bytes.
   *
   * @since 1.6
   */
  public long getFreeSpace() {
    try {
      StructStatVfs sb = Libcore.os.statvfs(path);
      return sb.f_bfree * sb.f_bsize; // free block count * block size in bytes.
    } catch (ErrnoException errnoException) {
      return 0;
    }
  }
}
origin: com.bugvm/bugvm-rt

public StructStatVfs statvfs(String path) throws ErrnoException { return os.statvfs(path); }
public String strerror(int errno) { return os.strerror(errno); }
origin: FlexoVM/flexovm

public StructStatVfs statvfs(String path) throws ErrnoException { return os.statvfs(path); }
public String strerror(int errno) { return os.strerror(errno); }
origin: com.mobidevelop.robovm/robovm-rt

  /**
   * Returns the number of free bytes on the partition containing this path.
   * Returns 0 if this path does not exist.
   *
   * <p>Note that this is likely to be an optimistic over-estimate and should not
   * be taken as a guarantee your application can actually write this many bytes.
   *
   * @since 1.6
   */
  public long getFreeSpace() {
    try {
      StructStatVfs sb = Libcore.os.statvfs(path);
      return sb.f_bfree * sb.f_bsize; // free block count * block size in bytes.
    } catch (ErrnoException errnoException) {
      return 0;
    }
  }
}
origin: com.bugvm/bugvm-rt

  /**
   * Returns the number of free bytes on the partition containing this path.
   * Returns 0 if this path does not exist.
   *
   * <p>Note that this is likely to be an optimistic over-estimate and should not
   * be taken as a guarantee your application can actually write this many bytes.
   *
   * @since 1.6
   */
  public long getFreeSpace() {
    try {
      StructStatVfs sb = Libcore.os.statvfs(path);
      return sb.f_bfree * sb.f_bsize; // free block count * block size in bytes.
    } catch (ErrnoException errnoException) {
      return 0;
    }
  }
}
origin: ibinti/bugvm

  /**
   * Returns the number of free bytes on the partition containing this path.
   * Returns 0 if this path does not exist.
   *
   * <p>Note that this is likely to be an optimistic over-estimate and should not
   * be taken as a guarantee your application can actually write this many bytes.
   *
   * @since 1.6
   */
  public long getFreeSpace() {
    try {
      StructStatVfs sb = Libcore.os.statvfs(path);
      return sb.f_bfree * sb.f_bsize; // free block count * block size in bytes.
    } catch (ErrnoException errnoException) {
      return 0;
    }
  }
}
libcore.ioOsstatvfs

Popular methods of Os

  • accept
  • access
  • bind
  • chmod
  • chown
  • close
  • connect
  • dup
  • dup2
  • environ
  • execv
  • execve
  • execv,
  • execve,
  • fchmod,
  • fchown,
  • fcntlFlock,
  • fcntlLong,
  • fcntlVoid,
  • fdatasync,
  • fstat,
  • fstatvfs

Popular in Java

  • Start an intent from android
  • scheduleAtFixedRate (Timer)
  • setScale (BigDecimal)
  • getContentResolver (Context)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now