Fix/fs-rmdir-deprecation (#3296)
This commit is contained in:
parent
f8361d50e7
commit
8b2c1cbe99
@ -271,12 +271,12 @@ class FileStorage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public clear = async (): Promise<void> => {
|
public clear = async (): Promise<void> => {
|
||||||
await fs.promises.rmdir(this.storageDir, { recursive: true })
|
await fs.promises.rm(this.storageDir, { recursive: true })
|
||||||
await this.initStorageDir()
|
await this.initStorageDir()
|
||||||
}
|
}
|
||||||
|
|
||||||
public clearTemp = async (): Promise<void> => {
|
public clearTemp = async (): Promise<void> => {
|
||||||
await fs.promises.rmdir(this.tempDir, { recursive: true })
|
await fs.promises.rm(this.tempDir, { recursive: true })
|
||||||
await fs.promises.mkdir(this.tempDir, { recursive: true })
|
await fs.promises.mkdir(this.tempDir, { recursive: true })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user