Removes a file or directory at the specified path, similar to rm -rf. If the path doesn't exist, the operation succeeds silently.
rm -rf
The absolute path of the file or directory to remove.
A promise that resolves to an AsyncVoidIOResult indicating success or failure.
AsyncVoidIOResult
1.0.0
(await remove('/path/to/file-or-directory')) .inspect(() => console.log('Removed successfully')); Copy
(await remove('/path/to/file-or-directory')) .inspect(() => console.log('Removed successfully'));
Removes a file or directory at the specified path, similar to
rm -rf. If the path doesn't exist, the operation succeeds silently.