fix(core): update
This commit is contained in:
parent
5b8a55d6d2
commit
5410df0011
@ -124,6 +124,7 @@ export class Directory {
|
|||||||
* gets a sub directory
|
* gets a sub directory
|
||||||
*/
|
*/
|
||||||
public async getSubDirectoryByName(dirNameArg: string): Promise<Directory> {
|
public async getSubDirectoryByName(dirNameArg: string): Promise<Directory> {
|
||||||
|
// TODO: make this recursive
|
||||||
const directories = await this.listDirectories();
|
const directories = await this.listDirectories();
|
||||||
return directories.find(directory => {
|
return directories.find(directory => {
|
||||||
return directory.name === dirNameArg;
|
return directory.name === dirNameArg;
|
||||||
@ -144,4 +145,20 @@ export class Directory {
|
|||||||
public async createFile(relativePathArg) {
|
public async createFile(relativePathArg) {
|
||||||
let completeFilePath: string = '';
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user