-
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(operation-purge-flow): enable delete directory now
Remove a directory or container and all of its contents
- Loading branch information
Showing
3 changed files
with
74 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,39 @@ | ||
import { IRcloneServer } from '../extra'; | ||
import { CombErr } from '../core'; | ||
import { AsyncPostFlow, AsyncPostFlowParamsNode } from './async-post-flow'; | ||
|
||
export interface OperationsPurgeFlowParamsNode extends AsyncPostFlowParamsNode { | ||
/** a remote name string eg "drive:" */ | ||
srcFs: string; | ||
/** a path within that remote eg "dir" */ | ||
srcRemote: string; | ||
} | ||
|
||
export interface OperationsPurgeFlowInNode | ||
extends OperationsPurgeFlowParamsNode, | ||
IRcloneServer {} | ||
|
||
interface OperationsPurgeFlowInnerParamsNode extends AsyncPostFlowParamsNode { | ||
/** a remote name string eg "drive:" */ | ||
fs: string; | ||
/** a path within that remote eg "dir" */ | ||
remote: string; | ||
} | ||
|
||
export abstract class OperationsPurgeFlow extends AsyncPostFlow< | ||
OperationsPurgeFlowInNode, | ||
OperationsPurgeFlowInnerParamsNode | ||
> { | ||
// public prerequest$: Observable<CombErr<OperationsPurgeFlowInNode>>; | ||
protected cmd: string = 'operations/purge'; | ||
protected params = ( | ||
pre: CombErr<OperationsPurgeFlowInNode> | ||
): OperationsPurgeFlowInnerParamsNode => { | ||
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