congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
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

  • Finding current android device location
  • runOnUiThread (Activity)
  • requestLocationUpdates (LocationManager)
  • onCreateOptionsMenu (Activity)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Menu (java.awt)
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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