-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sync-move-flow): enable move directory now
- Loading branch information
Showing
3 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { IRcloneServer } from '../extra'; | ||
import { CombErr } from '../core'; | ||
import { AsyncPostFlow, AsyncPostFlowParamsNode } from './async-post-flow'; | ||
|
||
export interface SyncMoveFlowParamsNode extends AsyncPostFlowParamsNode { | ||
/** a remote name string eg "drive:src" for the source */ | ||
srcFs: string; | ||
/** a remote name string eg "drive:dst" for the destination */ | ||
dstFs: string; | ||
/** delete empty src directories if set */ | ||
deleteEmptySrcDirs: boolean; | ||
} | ||
export interface SyncMoveFlowInNode extends SyncMoveFlowParamsNode, IRcloneServer {} | ||
|
||
export abstract class SyncMoveFlow extends AsyncPostFlow< | ||
SyncMoveFlowInNode, | ||
SyncMoveFlowParamsNode | ||
> { | ||
// public prerequest$: Observable<CombErr<SyncMoveFlowInNode>>; | ||
protected cmd: string = 'sync/move'; | ||
protected params = (pre: CombErr<SyncMoveFlowInNode>): SyncMoveFlowParamsNode => { | ||
if (pre[1].length !== 0) return {} as any; | ||
return { | ||
srcFs: pre[0].srcFs, | ||
dstFs: pre[0].dstFs, | ||
deleteEmptySrcDirs: pre[0].deleteEmptySrcDirs, | ||
}; | ||
}; | ||
protected cacheSupport: boolean = false; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters