@@ -2470,11 +2470,11 @@ changes:
2470
2470
Asynchronously creates a directory.
2471
2471
2472
2472
The callback is given a possible exception and, if ` recursive ` is ` true ` , the
2473
- first folder path created, ` (err, [path]) ` .
2473
+ first directory path created, ` (err, [path]) ` .
2474
2474
2475
2475
The optional ` options ` argument can be an integer specifying mode (permission
2476
2476
and sticky bits), or an object with a ` mode ` property and a ` recursive `
2477
- property indicating whether parent folders should be created. Calling
2477
+ property indicating whether parent directories should be created. Calling
2478
2478
` fs.mkdir() ` when ` path ` is a directory that exists results in an error only
2479
2479
when ` recursive ` is false.
2480
2480
@@ -2520,7 +2520,7 @@ changes:
2520
2520
* Returns: {string|undefined}
2521
2521
2522
2522
Synchronously creates a directory. Returns ` undefined ` , or if ` recursive ` is
2523
- ` true ` , the first folder path created.
2523
+ ` true ` , the first directory path created.
2524
2524
This is the synchronous version of [ ` fs.mkdir() ` ] [ ] .
2525
2525
2526
2526
See also: mkdir(2).
@@ -2547,7 +2547,7 @@ changes:
2547
2547
* ` encoding ` {string} ** Default:** ` 'utf8' `
2548
2548
* ` callback ` {Function}
2549
2549
* ` err ` {Error}
2550
- * ` folder ` {string}
2550
+ * ` directory ` {string}
2551
2551
2552
2552
Creates a unique temporary directory.
2553
2553
@@ -2557,16 +2557,16 @@ inconsistencies, avoid trailing `X` characters in `prefix`. Some platforms,
2557
2557
notably the BSDs, can return more than six random characters, and replace
2558
2558
trailing ` X ` characters in ` prefix ` with random characters.
2559
2559
2560
- The created folder path is passed as a string to the callback's second
2560
+ The created directory path is passed as a string to the callback's second
2561
2561
parameter.
2562
2562
2563
2563
The optional ` options ` argument can be a string specifying an encoding, or an
2564
2564
object with an ` encoding ` property specifying the character encoding to use.
2565
2565
2566
2566
``` js
2567
- fs .mkdtemp (path .join (os .tmpdir (), ' foo-' ), (err , folder ) => {
2567
+ fs .mkdtemp (path .join (os .tmpdir (), ' foo-' ), (err , directory ) => {
2568
2568
if (err) throw err;
2569
- console .log (folder );
2569
+ console .log (directory );
2570
2570
// Prints: /tmp/foo-itXde2 or C:\Users\...\AppData\Local\Temp\foo-itXde2
2571
2571
});
2572
2572
```
@@ -2582,19 +2582,19 @@ must end with a trailing platform-specific path separator
2582
2582
const tmpDir = os .tmpdir ();
2583
2583
2584
2584
// This method is *INCORRECT*:
2585
- fs .mkdtemp (tmpDir, (err , folder ) => {
2585
+ fs .mkdtemp (tmpDir, (err , directory ) => {
2586
2586
if (err) throw err;
2587
- console .log (folder );
2587
+ console .log (directory );
2588
2588
// Will print something similar to `/tmpabc123`.
2589
2589
// A new temporary directory is created at the file system root
2590
2590
// rather than *within* the /tmp directory.
2591
2591
});
2592
2592
2593
2593
// This method is *CORRECT*:
2594
2594
const { sep } = require (' path' );
2595
- fs .mkdtemp (` ${ tmpDir}${ sep} ` , (err , folder ) => {
2595
+ fs .mkdtemp (` ${ tmpDir}${ sep} ` , (err , directory ) => {
2596
2596
if (err) throw err;
2597
- console .log (folder );
2597
+ console .log (directory );
2598
2598
// Will print something similar to `/tmp/abc123`.
2599
2599
// A new temporary directory is created within
2600
2600
// the /tmp directory.
@@ -2611,7 +2611,7 @@ added: v5.10.0
2611
2611
* ` encoding ` {string} ** Default:** ` 'utf8' `
2612
2612
* Returns: {string}
2613
2613
2614
- Returns the created folder path.
2614
+ Returns the created directory path.
2615
2615
2616
2616
For detailed information, see the documentation of the asynchronous version of
2617
2617
this API: [ ` fs.mkdtemp() ` ] [ ] .
@@ -3476,7 +3476,7 @@ error raised if the file is not available.
3476
3476
To check if a file exists without manipulating it afterwards, [ ` fs.access() ` ] [ ]
3477
3477
is recommended.
3478
3478
3479
- For example, given the following folder structure:
3479
+ For example, given the following directory structure:
3480
3480
3481
3481
``` fundamental
3482
3482
- txtDir
@@ -4945,11 +4945,11 @@ added: v10.0.0
4945
4945
* Returns: {Promise}
4946
4946
4947
4947
Asynchronously creates a directory then resolves the ` Promise ` with either no
4948
- arguments, or the first folder path created if ` recursive ` is ` true ` .
4948
+ arguments, or the first directory path created if ` recursive ` is ` true ` .
4949
4949
4950
4950
The optional ` options ` argument can be an integer specifying mode (permission
4951
4951
and sticky bits), or an object with a ` mode ` property and a ` recursive `
4952
- property indicating whether parent folders should be created. Calling
4952
+ property indicating whether parent directories should be created. Calling
4953
4953
` fsPromises.mkdir() ` when ` path ` is a directory that exists results in a
4954
4954
rejection only when ` recursive ` is false.
4955
4955
@@ -4964,7 +4964,7 @@ added: v10.0.0
4964
4964
* Returns: {Promise}
4965
4965
4966
4966
Creates a unique temporary directory and resolves the ` Promise ` with the created
4967
- folder path. A unique directory name is generated by appending six random
4967
+ directory path. A unique directory name is generated by appending six random
4968
4968
characters to the end of the provided ` prefix ` . Due to platform
4969
4969
inconsistencies, avoid trailing ` X ` characters in ` prefix ` . Some platforms,
4970
4970
notably the BSDs, can return more than six random characters, and replace
0 commit comments