| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 57c170c commit 68b7c80
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2459,11 +2459,11 @@ changes: | |||
| 2459 | 2459 | Asynchronously creates a directory. | |
| 2460 | 2460 | ||
| 2461 | 2461 | The callback is given a possible exception and, if `recursive` is `true`, the | |
| 2462 | - first folder path created, `(err, [path])`. | ||
| 2462 | + first directory path created, `(err, [path])`. | ||
| 2463 | 2463 | ||
| 2464 | 2464 | The optional `options` argument can be an integer specifying `mode` (permission | |
| 2465 | 2465 | and sticky bits), or an object with a `mode` property and a `recursive` | |
| 2466 | - property indicating whether parent folders should be created. Calling | ||
| 2466 | + property indicating whether parent directories should be created. Calling | ||
| 2467 | 2467 | `fs.mkdir()` when `path` is a directory that exists results in an error only | |
| 2468 | 2468 | when `recursive` is false. | |
| 2469 | 2469 | ||
@@ -2509,7 +2509,7 @@ changes: | |||
| 2509 | 2509 | * Returns: {string|undefined} | |
| 2510 | 2510 | ||
| 2511 | 2511 | Synchronously creates a directory. Returns `undefined`, or if `recursive` is | |
| 2512 | - `true`, the first folder path created. | ||
| 2512 | + `true`, the first directory path created. | ||
| 2513 | 2513 | This is the synchronous version of [`fs.mkdir()`][]. | |
| 2514 | 2514 | ||
| 2515 | 2515 | See also: mkdir(2). | |
@@ -2536,7 +2536,7 @@ changes: | |||
| 2536 | 2536 | * `encoding` {string} **Default:** `'utf8'` | |
| 2537 | 2537 | * `callback` {Function} | |
| 2538 | 2538 | * `err` {Error} | |
| 2539 | - * `folder` {string} | ||
| 2539 | + * `directory` {string} | ||
| 2540 | 2540 | ||
| 2541 | 2541 | Creates a unique temporary directory. | |
| 2542 | 2542 | ||
@@ -2546,16 +2546,16 @@ inconsistencies, avoid trailing `X` characters in `prefix`. Some platforms, | |||
| 2546 | 2546 | notably the BSDs, can return more than six random characters, and replace | |
| 2547 | 2547 | trailing `X` characters in `prefix` with random characters. | |
| 2548 | 2548 | ||
| 2549 | - The created folder path is passed as a string to the callback's second | ||
| 2549 | + The created directory path is passed as a string to the callback's second | ||
| 2550 | 2550 | parameter. | |
| 2551 | 2551 | ||
| 2552 | 2552 | The optional `options` argument can be a string specifying an encoding, or an | |
| 2553 | 2553 | object with an `encoding` property specifying the character encoding to use. | |
| 2554 | 2554 | ||
| 2555 | 2555 | ```js | |
| 2556 | - fs.mkdtemp(path.join(os.tmpdir(), 'foo-'), (err, folder) => { | ||
| 2556 | + fs.mkdtemp(path.join(os.tmpdir(), 'foo-'), (err, directory) => { | ||
| 2557 | 2557 | if (err) throw err; | |
| 2558 | - console.log(folder); | ||
| 2558 | + console.log(directory); | ||
| 2559 | 2559 | // Prints: /tmp/foo-itXde2 or C:\Users\...\AppData\Local\Temp\foo-itXde2 | |
| 2560 | 2560 | }); | |
| 2561 | 2561 | ``` | |
@@ -2571,19 +2571,19 @@ must end with a trailing platform-specific path separator | |||
| 2571 | 2571 | const tmpDir = os.tmpdir(); | |
| 2572 | 2572 | ||
| 2573 | 2573 | // This method is *INCORRECT*: | |
| 2574 | - fs.mkdtemp(tmpDir, (err, folder) => { | ||
| 2574 | + fs.mkdtemp(tmpDir, (err, directory) => { | ||
| 2575 | 2575 | if (err) throw err; | |
| 2576 | - console.log(folder); | ||
| 2576 | + console.log(directory); | ||
| 2577 | 2577 | // Will print something similar to `/tmpabc123`. | |
| 2578 | 2578 | // A new temporary directory is created at the file system root | |
| 2579 | 2579 | // rather than *within* the /tmp directory. | |
| 2580 | 2580 | }); | |
| 2581 | 2581 | ||
| 2582 | 2582 | // This method is *CORRECT*: | |
| 2583 | 2583 | const { sep } = require('path'); | |
| 2584 | - fs.mkdtemp(`${tmpDir}${sep}`, (err, folder) => { | ||
| 2584 | + fs.mkdtemp(`${tmpDir}${sep}`, (err, directory) => { | ||
| 2585 | 2585 | if (err) throw err; | |
| 2586 | - console.log(folder); | ||
| 2586 | + console.log(directory); | ||
| 2587 | 2587 | // Will print something similar to `/tmp/abc123`. | |
| 2588 | 2588 | // A new temporary directory is created within | |
| 2589 | 2589 | // the /tmp directory. | |
@@ -2600,7 +2600,7 @@ added: v5.10.0 | |||
| 2600 | 2600 | * `encoding` {string} **Default:** `'utf8'` | |
| 2601 | 2601 | * Returns: {string} | |
| 2602 | 2602 | ||
| 2603 | - Returns the created folder path. | ||
| 2603 | + Returns the created directory path. | ||
| 2604 | 2604 | ||
| 2605 | 2605 | For detailed information, see the documentation of the asynchronous version of | |
| 2606 | 2606 | this API: [`fs.mkdtemp()`][]. | |
@@ -3465,7 +3465,7 @@ error raised if the file is not available. | |||
| 3465 | 3465 | To check if a file exists without manipulating it afterwards, [`fs.access()`][] | |
| 3466 | 3466 | is recommended. | |
| 3467 | 3467 | ||
| 3468 | - For example, given the following folder structure: | ||
| 3468 | + For example, given the following directory structure: | ||
| 3469 | 3469 | ||
| 3470 | 3470 | ```fundamental | |
| 3471 | 3471 | - txtDir | |
@@ -4972,11 +4972,11 @@ added: v10.0.0 | |||
| 4972 | 4972 | * Returns: {Promise} | |
| 4973 | 4973 | ||
| 4974 | 4974 | Asynchronously creates a directory then resolves the `Promise` with either no | |
| 4975 | - arguments, or the first folder path created if `recursive` is `true`. | ||
| 4975 | + arguments, or the first directory path created if `recursive` is `true`. | ||
| 4976 | 4976 | ||
| 4977 | 4977 | The optional `options` argument can be an integer specifying `mode` (permission | |
| 4978 | 4978 | and sticky bits), or an object with a `mode` property and a `recursive` | |
| 4979 | - property indicating whether parent folders should be created. Calling | ||
| 4979 | + property indicating whether parent directories should be created. Calling | ||
| 4980 | 4980 | `fsPromises.mkdir()` when `path` is a directory that exists results in a | |
| 4981 | 4981 | rejection only when `recursive` is false. | |
| 4982 | 4982 | ||
@@ -4991,7 +4991,7 @@ added: v10.0.0 | |||
| 4991 | 4991 | * Returns: {Promise} | |
| 4992 | 4992 | ||
| 4993 | 4993 | Creates a unique temporary directory and resolves the `Promise` with the created | |
| 4994 | - folder path. A unique directory name is generated by appending six random | ||
| 4994 | + directory path. A unique directory name is generated by appending six random | ||
| 4995 | 4995 | characters to the end of the provided `prefix`. Due to platform | |
| 4996 | 4996 | inconsistencies, avoid trailing `X` characters in `prefix`. Some platforms, | |
| 4997 | 4997 | notably the BSDs, can return more than six random characters, and replace | |
| Back | FazBrowse Home | New Git URL |
0 commit comments