-
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(delete-file-flow): enable delete file now
- Loading branch information
Showing
5 changed files
with
94 additions
and
8 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,39 @@ | ||
import { IRcloneServer } from '../extra'; | ||
import { CombErr } from '../core'; | ||
import { AsyncPostFlow, AsyncPostFlowParamsNode } from './async-post-flow'; | ||
|
||
export interface OperationsDeletefileFlowParamsNode extends AsyncPostFlowParamsNode { | ||
/** a remote name string eg "drive:" */ | ||
srcFs: string; | ||
/** a path within that remote eg "dir" */ | ||
srcRemote: string; | ||
} | ||
|
||
export interface OperationsDeletefileFlowInNode | ||
extends OperationsDeletefileFlowParamsNode, | ||
IRcloneServer {} | ||
|
||
interface OperationsDeletefileFlowInnerParamsNode extends AsyncPostFlowParamsNode { | ||
/** a remote name string eg "drive:" */ | ||
fs: string; | ||
/** a path within that remote eg "dir" */ | ||
remote: string; | ||
} | ||
|
||
export abstract class OperationsDeletefileFlow extends AsyncPostFlow< | ||
OperationsDeletefileFlowInNode, | ||
OperationsDeletefileFlowInnerParamsNode | ||
> { | ||
// public prerequest$: Observable<CombErr<OperationsDeletefileFlowInNode>>; | ||
protected cmd: string = 'operations/deletefile'; | ||
protected params = ( | ||
pre: CombErr<OperationsDeletefileFlowInNode> | ||
): OperationsDeletefileFlowInnerParamsNode => { | ||
if (pre[1].length !== 0) return {} as any; | ||
return { | ||
fs: pre[0].srcFs, | ||
remote: pre[0].srcRemote, | ||
}; | ||
}; | ||
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
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