| description | The RmDir object helps you create your own custom unlink method. |
|---|
Invoke it and chain the methods:
new srm.RmDir()
.random()
.rmDir(){% hint style="danger" %}
Unless you know what you鈥檙e doing, always end with .rmDir().
{% endhint %}
- No arguments
Help to construct the tree of erased directories.
- fun:
(p: string, uuid: string) => Promise<string>
Your custom function to apply on the directory.
new srm.RmDir()
.then(function (p) {
return new Promise((resolve, reject) => {
if (p === '/d/code/')
reject(new Error())
else
resolve(p)
})
})
.rmdir()- No arguments.
Rename the directory to a random string of length 12.
- No arguments.
The last function to be executed: remove the directory.
Required, invalid standard if omitted.
Use this to compile the standard without rmDir.
Useful for preview and testing uses.
Used in rmdir().
new RmDir()
.log()
.compile