public class StatVfs extends Object
| 构造器 | 说明 |
|---|---|
StatVfs(String path) |
A constructor used to create a
StatVfs instance with the specified path. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
long |
getAvailableSpace() |
Obtains the available bytes of the file system for the application.
|
long |
getFreeSpace() |
Obtains the remaining bytes of the file system.
|
long |
getSpace() |
Obtains the total bytes of the file system.
|
static boolean |
isSupported() |
Checks whether StatVfs is supported on current device.
|
void |
reStatVfs(String path) |
Updates information about the file system with the specified path.
|
public StatVfs(String path)
StatVfs instance with the specified path.path - Indicates the path.public static boolean isSupported()
true if StatVfs is supported on current device; returns
false otherwise.public void reStatVfs(String path)
path - Indicates the path.public long getSpace()
-1 if the path of the file system is invalid.public long getFreeSpace()
-1 if the path of the file system is invalid.public long getAvailableSpace()
-1 if the path of the file system is invalid.