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:
Barret Rennie 2021-11-23 18:48:01 +00:00
Родитель aa8c75b83f
Коммит 8081914485
1 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -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