> 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.
> - The APIs of this module are system APIs and cannot be called by third-party applications.
## Modules to Import
## Modules to Import
...
@@ -9,19 +11,17 @@
...
@@ -9,19 +11,17 @@
importenvironmentfrom'@ohos.environment';
importenvironmentfrom'@ohos.environment';
```
```
## System Capabilities
SystemCapability.FileManagement.File.Environment
## environment.getStorageDataDir
## environment.getStorageDataDir
getStorageDataDir():Promise<string>
getStorageDataDir():Promise<string>
Obtains the root directory of the storage. This method uses a promise to return the result.
Obtains the root directory of the storage. This API uses a promise to return the result.