DeletingFolders: the mechanism DeletingFoldersService implements.
API
@Interface()
export abstract class DeletingFolders {
abstract moveAside(abs: string, place: DeletingPlace, label: string): string | null;
abstract purge(moved: readonly string[]): Promise<void>;
abstract resume(within: string): Promise<void>;
abstract deletingDirIn(within: string): string;
}Contract Topology
Static AST wiring across @Module / @Provide / @UseMembers (4)
moveAside
moveAside(abs: string, place: DeletingPlace, label: string): string | nullMoves abs aside in one synchronous rename, under a unique name that starts with label
(kept to the id alphabet), and answers where it now is; null when nothing is at abs. Any
other failure throws, with nothing moved. Synchronous so that a caller can check that the
folder may go and move it in one step: no Task can start in between, and one that starts
afterwards finds the folder gone and never writes into a folder being removed.
stringDeletingPlacestringstring | nullpurge
purge(moved: readonly string[]): Promise<void>Removes the moved folders' contents in the background, one after another, through the
server's filesystem throttle; resolves when all are done. What could not be removed is logged
and stays where it waits: a Project's deleting folder is removed again at every start, a
within one by resume.
readonly string[]Promise<void>resume
resume(within: string): Promise<void>Removes what an earlier process left in within's deleting folder.
stringPromise<void>deletingDirIn
deletingDirIn(within: string): stringwithin's deleting folder: an entry of it that is not one of its own.
stringstring