fix(core): update

This commit is contained in:
Philipp Kunz 2019-10-18 18:44:54 +02:00
parent 5b8a55d6d2
commit 5410df0011

View File

@ -124,6 +124,7 @@ export class Directory {
* gets a sub directory
*/
public async getSubDirectoryByName(dirNameArg: string): Promise<Directory> {
// 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);
}
}