Skip to main content
Version: v1.0

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

DescriptionRequiredTypeDefault
Mini Program /data directory file name (relative path)yesstring-

result

DescriptionType
The result of the operation, 0 means successnumber

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)
}
})