> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## Modules to Import
...
...
@@ -9,7 +9,7 @@
importstatfsfrom'@ohos.statfs';
```
## Note
## Guidelines
Before using this module to perform operations on a file or directory, obtain the absolute path of the file or directory. For details, see [getOrCreateLocalDir of the Context module](js-apis-Context.md).
...
...
@@ -21,27 +21,25 @@ For example, if the application directory obtained by using **getOrCreateLocalDi
letpath=dir+"xxx.txt";
```
## System Capabilities
SystemCapability.FileManagement.File.FileIO
## statfs.getFreeBytes
getFreeBytes(path:string):Promise<number>
Obtains the number of free bytes of the specified file system in asynchronous mode. This method uses a promise to return the result.
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> - The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> - This is a system API and cannot be called by third-party applications.