> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
This module provides functions related to file security levels. It provides JS APIs to obtain and set file security levels.
## Modules to Import
```js
importsecurityLabelfrom'@ohos.securityLabel';
```
## Usage
Before using the APIs provided by this module to perform operations on a file or directory, obtain the path of the application sandbox. For details, see [getOrCreateLocalDir of the Context module](js-apis-Context.md).
Application sandbox path of a file or directory = Application directory + File name or directory name
For example, if the application directory obtained by using **getOrCreateLocalDir** is **dir** and the file name is **xxx.txt**, the application sandbox path of the file is as follows: