( storageName: string, path: string, destStoragename: string, destPath: string, pathF2f: boolean = false )
| 367 | |
| 368 | //copyFile |
| 369 | async function copyFile( |
| 370 | storageName: string, |
| 371 | path: string, |
| 372 | destStoragename: string, |
| 373 | destPath: string, |
| 374 | pathF2f: boolean = false |
| 375 | ) { |
| 376 | //pathF2f:destPath为文件时需要设置为true。(默认false时为文件夹,文件名来自srcPath) |
| 377 | await rclone_api_post( |
| 378 | '/operations/copyfile', |
| 379 | { |
| 380 | srcFs: convertStoragePath(storageName, undefined, undefined, undefined, true), |
| 381 | srcRemote: convertStoragePath(storageName, path, undefined, true), |
| 382 | dstFs: convertStoragePath(destStoragename, undefined, undefined, undefined, true), |
| 383 | dstRemote: |
| 384 | convertStoragePath(destStoragename, destPath, !pathF2f, true)! + |
| 385 | (!pathF2f && getFileName(path)), |
| 386 | }, |
| 387 | true |
| 388 | ) |
| 389 | } |
| 390 | |
| 391 | async function moveFile( |
| 392 | storageName: string, |
no test coverage detected