hmFS.remove(path)
For an introduction to the Zepp OS Mini Program file system, please refer to File System.
Delete the file in the /data data directory of the Mini Program.
Type
(path: string) => result
Parameters
path
| Description | Required | Type | Default |
|---|---|---|---|
Mini Program /data directory file name (relative path) | yes | string | - |
result
| Description | Type |
|---|---|
The result of the operation, 0 means success | number |
Please refer to File System - Error Code for the rest of the error codes.
Code example
Page({
build() {
const result = hmFS.remove('path/to/test_file.txt')
console.log(result)
}
})