> 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
```js
importenvironmentfrom'@ohos.environment';
```
## System Capabilities
SystemCapability.FileManagement.File.Environment
## environment.getStorageDataDir
getStorageDataDir():Promise<string>
Obtains the root directory of the storage. This method uses a promise to return the result.
- Return value
| Type| Description|
| --------------------- | ---------------- |
| Promise<string> | Promise returned with the root directory of the storage.|