зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1741920 - Correct documentation about IOUtils.remove vs OS.File.removeEmptyDir r=Gijs DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D131536
This commit is contained in:
Родитель
aa8c75b83f
Коммит
8081914485
|
@ -336,7 +336,7 @@ await OS.File.remove(path, { ignoreAbsent: true });
|
||||||
await IOUtils.remove(path);
|
await IOUtils.remove(path);
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Remove a directory
|
##### Remove a directory and all its contents
|
||||||
|
|
||||||
**`OS.File`**
|
**`OS.File`**
|
||||||
```js
|
```js
|
||||||
|
@ -352,11 +352,12 @@ await IOUtils.remove(path, { recursive: true });
|
||||||
|
|
||||||
**`OS.File`**
|
**`OS.File`**
|
||||||
```js
|
```js
|
||||||
await OS.File.removeEmptyDir(path, { ignoreAbsent: true });
|
await OS.File.removeEmptyDir(path); // Will throw an exception if `path` is not empty.
|
||||||
```
|
```
|
||||||
|
|
||||||
**`IOUtils`**
|
**`IOUtils`**
|
||||||
```js
|
```js
|
||||||
await IOUtils.remove(path, { recursive: true });
|
await IOUtils.remove(path); // Will throw an exception if `path` is not empty.
|
||||||
```
|
```
|
||||||
|
|
||||||
### Make a directory
|
### Make a directory
|
||||||
|
|
Загрузка…
Ссылка в новой задаче