@maioradv/nestjs-core 1.8.9 → 1.8.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8,6 +8,7 @@ export declare class StorageService {
|
|
|
8
8
|
append(relativePath: string, data: string | Uint8Array): Promise<void>;
|
|
9
9
|
delete(relativePath: string): Promise<void>;
|
|
10
10
|
stat(relativePath: string): Promise<Stats>;
|
|
11
|
+
createDir(relativePath: string): Promise<void>;
|
|
11
12
|
private realPath;
|
|
12
13
|
private safeDirectory;
|
|
13
14
|
}
|
|
@@ -42,6 +42,10 @@ let StorageService = class StorageService {
|
|
|
42
42
|
const realPath = this.realPath(relativePath);
|
|
43
43
|
return fs_1.promises.stat(realPath);
|
|
44
44
|
}
|
|
45
|
+
async createDir(relativePath) {
|
|
46
|
+
const realPath = this.realPath(relativePath);
|
|
47
|
+
await this.safeDirectory(realPath);
|
|
48
|
+
}
|
|
45
49
|
realPath(relativePath) {
|
|
46
50
|
return this.useRealPath ? relativePath : (0, path_1.join)(this.rootPath, relativePath);
|
|
47
51
|
}
|