Home > SYS_FileSystem > deleteFileInFileSystem
SYS_FileSystem.deleteFileInFileSystem() method
This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Delete a file in the file system
Signature
function deleteFileInFileSystem(uri: string, force?: boolean): Promise<boolean>;Parameters
Parameter | Type | Description |
|---|---|---|
uri | string | File resource locator. If it ends with a slash |
force | boolean | (Optional) Force delete the folder (whether to force delete the folder when the target is a folder containing files) |
Returns
Promise<boolean>
Delete Whether the operation is successful
Remarks
Note 1: This API is only valid for clients. Calling it in a browser environment will always throw Error
Note 2: This API requires the user to enable the extension external interaction permission, if not enabled, it will always throw Error