MCPcopy Create free account
hub / github.com/VirtualHotBar/NetMount / delFile

Function delFile

src/controller/storage/storage.ts:331–343  ·  view source on GitHub ↗
(storageName: string, path: string, refreshCallback?: RefreshCallback)

Source from the content-addressed store, hash-verified

329type RefreshCallback = () => void
330
331async function delFile(storageName: string, path: string, refreshCallback?: RefreshCallback) {
332 if (path.substring(0, 1) == '/') {
333 path = path.substring(1, path.length)
334 }
335 await rclone_api_post('/operations/deletefile', {
336 fs: convertStoragePath(storageName, undefined, undefined, undefined, true),
337 remote: convertStoragePath(storageName, path, false, true),
338 })
339
340 if (refreshCallback) {
341 refreshCallback()
342 }
343}
344
345async function delDir(storageName: string, path: string, refreshCallback?: RefreshCallback) {
346 await rclone_api_post('/operations/purge', {

Callers 2

ExplorerItemFunction · 0.90
executeTaskFunction · 0.90

Calls 2

rclone_api_postFunction · 0.90
convertStoragePathFunction · 0.85

Tested by

no test coverage detected