Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(move-file-flow): enable move file now
- Loading branch information
Showing
3 changed files
with
90 additions
and
7 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,37 @@ | ||
import { IRcloneServer } from '../extra'; | ||
import { CombErr } from '../core'; | ||
import { AsyncPostFlow, AsyncPostFlowParamsNode } from './async-post-flow'; | ||
|
||
export interface OperationsMovefileFlowParamsNode extends AsyncPostFlowParamsNode { | ||
/** a remote name string eg “drive:” for the source */ | ||
srcFs: string; | ||
/** a path within that remote eg “file.txt” for the source */ | ||
srcRemote: string; | ||
/** a remote name string eg “drive2:” for the destination */ | ||
dstFs: string; | ||
/** a path within that remote eg “file2.txt” for the destination */ | ||
dstRemote: string; | ||
} | ||
export interface OperationsMovefileFlowInNode | ||
extends OperationsMovefileFlowParamsNode, | ||
IRcloneServer {} | ||
|
||
export abstract class OperationsMovefileFlow extends AsyncPostFlow< | ||
OperationsMovefileFlowInNode, | ||
OperationsMovefileFlowParamsNode | ||
> { | ||
// public prerequest$: Observable<CombErr<OperationsMovefileFlowInNode>>; | ||
protected cmd: string = 'operations/movefile'; | ||
protected params = ( | ||
pre: CombErr<OperationsMovefileFlowInNode> | ||
): OperationsMovefileFlowParamsNode => { | ||
if (pre[1].length !== 0) return {} as any; | ||
return { | ||
srcFs: pre[0].srcFs, | ||
srcRemote: pre[0].srcRemote, | ||
dstFs: pre[0].dstFs, | ||
dstRemote: pre[0].dstRemote, | ||
}; | ||
}; | ||
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