| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2212,6 +2212,15 @@ fs.mkdir('/tmp/a/apple', { recursive: true }, (err) => { | |||
| 2212 | 2212 | }); | |
| 2213 | 2213 | ``` | |
| 2214 | 2214 | ||
| 2215 | + On Windows, using `fs.mkdir()` on the root directory even with recursion will | ||
| 2216 | + result in an error: | ||
| 2217 | + | ||
| 2218 | + ```js | ||
| 2219 | + fs.mkdir('/', { recursive: true }, (err) => { | ||
| 2220 | + // => [Error: EPERM: operation not permitted, mkdir 'C:\'] | ||
| 2221 | + }); | ||
| 2222 | + ``` | ||
| 2223 | + | ||
| 2215 | 2224 | See also: mkdir(2). | |
| 2216 | 2225 | ||
| 2217 | 2226 | ## fs.mkdirSync(path[, options]) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments