diff --git a/ts/smartbucket.classes.directory.ts b/ts/smartbucket.classes.directory.ts index ab1ad09..65e6bd7 100644 --- a/ts/smartbucket.classes.directory.ts +++ b/ts/smartbucket.classes.directory.ts @@ -124,6 +124,7 @@ export class Directory { * gets a sub directory */ public async getSubDirectoryByName(dirNameArg: string): Promise { + // TODO: make this recursive const directories = await this.listDirectories(); return directories.find(directory => { return directory.name === dirNameArg; @@ -144,4 +145,20 @@ export class Directory { public async createFile(relativePathArg) { let completeFilePath: string = ''; } + + // file operations + public async fastStore(pathArg: string, contentArg: string) { + const path = plugins.path.join(this.getBasePath(), pathArg); + await this.bucketRef.fastStore(path, contentArg); + } + + public async fastGet(pathArg: string) { + const path = plugins.path.join(this.getBasePath(), pathArg); + await this.bucketRef.fastGet(path); + } + + public async fastRemove(pathArg: string) { + const path = plugins.path.join(this.getBasePath(), pathArg); + await this.bucketRef.fastRemove(path); + } }