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

Function moveFile

src/controller/storage/storage.ts:391–411  ·  view source on GitHub ↗
(
  storageName: string,
  path: string,
  destStoragename: string,
  destPath: string,
  newNmae?: string,
  pathF2f: boolean = false
)

Source from the content-addressed store, hash-verified

389}
390
391async function moveFile(
392 storageName: string,
393 path: string,
394 destStoragename: string,
395 destPath: string,
396 newNmae?: string,
397 pathF2f: boolean = false
398) {
399 await rclone_api_post(
400 '/operations/movefile',
401 {
402 srcFs: convertStoragePath(storageName, undefined, undefined, undefined, true),
403 srcRemote: convertStoragePath(storageName, formatPathRclone(path), undefined, true),
404 dstFs: convertStoragePath(destStoragename, undefined, undefined, undefined, true),
405 dstRemote:
406 convertStoragePath(destStoragename, destPath, !pathF2f, true) +
407 (!pathF2f && newNmae ? newNmae : getFileName(path)),
408 },
409 true
410 )
411}
412
413//copyDir
414async function copyDir(

Callers 3

fileRenameFunction · 0.90
ExplorerItemFunction · 0.90
executeTaskFunction · 0.90

Calls 4

rclone_api_postFunction · 0.90
convertStoragePathFunction · 0.85
formatPathRcloneFunction · 0.85
getFileNameFunction · 0.85

Tested by

no test coverage detected