@@ -2470,11 +2470,11 @@ changes:
24702470Asynchronously creates a directory.
24712471
24722472The 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]) ` .
24742474
24752475The optional ` options ` argument can be an integer specifying mode (permission
24762476and 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
24782478` fs.mkdir() ` when ` path ` is a directory that exists results in an error only
24792479when ` recursive ` is false.
24802480
@@ -2520,7 +2520,7 @@ changes:
25202520* Returns: {string|undefined}
25212521
25222522Synchronously creates a directory. Returns ` undefined ` , or if ` recursive ` is
2523- ` true ` , the first folder path created.
2523+ ` true ` , the first directory path created.
25242524This is the synchronous version of [ ` fs.mkdir() ` ] [ ] .
25252525
25262526See also: mkdir(2).
@@ -2547,7 +2547,7 @@ changes:
25472547 * ` encoding ` {string} ** Default:** ` 'utf8' `
25482548* ` callback ` {Function}
25492549 * ` err ` {Error}
2550- * ` folder ` {string}
2550+ * ` directory ` {string}
25512551
25522552Creates a unique temporary directory.
25532553
@@ -2557,16 +2557,16 @@ inconsistencies, avoid trailing `X` characters in `prefix`. Some platforms,
25572557notably the BSDs, can return more than six random characters, and replace
25582558trailing ` X ` characters in ` prefix ` with random characters.
25592559
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
25612561parameter.
25622562
25632563The optional ` options ` argument can be a string specifying an encoding, or an
25642564object with an ` encoding ` property specifying the character encoding to use.
25652565
25662566``` js
2567- fs .mkdtemp (path .join (os .tmpdir (), ' foo-' ), (err , folder ) => {
2567+ fs .mkdtemp (path .join (os .tmpdir (), ' foo-' ), (err , directory ) => {
25682568 if (err) throw err;
2569- console .log (folder );
2569+ console .log (directory );
25702570 // Prints: /tmp/foo-itXde2 or C:\Users\...\AppData\Local\Temp\foo-itXde2
25712571});
25722572```
@@ -2582,19 +2582,19 @@ must end with a trailing platform-specific path separator
25822582const tmpDir = os .tmpdir ();
25832583
25842584// This method is *INCORRECT*:
2585- fs .mkdtemp (tmpDir, (err , folder ) => {
2585+ fs .mkdtemp (tmpDir, (err , directory ) => {
25862586 if (err) throw err;
2587- console .log (folder );
2587+ console .log (directory );
25882588 // Will print something similar to `/tmpabc123`.
25892589 // A new temporary directory is created at the file system root
25902590 // rather than *within* the /tmp directory.
25912591});
25922592
25932593// This method is *CORRECT*:
25942594const { sep } = require (' path' );
2595- fs .mkdtemp (` ${ tmpDir}${ sep} ` , (err , folder ) => {
2595+ fs .mkdtemp (` ${ tmpDir}${ sep} ` , (err , directory ) => {
25962596 if (err) throw err;
2597- console .log (folder );
2597+ console .log (directory );
25982598 // Will print something similar to `/tmp/abc123`.
25992599 // A new temporary directory is created within
26002600 // the /tmp directory.
@@ -2611,7 +2611,7 @@ added: v5.10.0
26112611 * ` encoding ` {string} ** Default:** ` 'utf8' `
26122612* Returns: {string}
26132613
2614- Returns the created folder path.
2614+ Returns the created directory path.
26152615
26162616For detailed information, see the documentation of the asynchronous version of
26172617this API: [ ` fs.mkdtemp() ` ] [ ] .
@@ -3476,7 +3476,7 @@ error raised if the file is not available.
34763476To check if a file exists without manipulating it afterwards, [ ` fs.access() ` ] [ ]
34773477is recommended.
34783478
3479- For example, given the following folder structure:
3479+ For example, given the following directory structure:
34803480
34813481``` fundamental
34823482- txtDir
@@ -4945,11 +4945,11 @@ added: v10.0.0
49454945* Returns: {Promise}
49464946
49474947Asynchronously 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 ` .
49494949
49504950The optional ` options ` argument can be an integer specifying mode (permission
49514951and 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
49534953` fsPromises.mkdir() ` when ` path ` is a directory that exists results in a
49544954rejection only when ` recursive ` is false.
49554955
@@ -4964,7 +4964,7 @@ added: v10.0.0
49644964* Returns: {Promise}
49654965
49664966Creates 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
49684968characters to the end of the provided ` prefix ` . Due to platform
49694969inconsistencies, avoid trailing ` X ` characters in ` prefix ` . Some platforms,
49704970notably the BSDs, can return more than six random characters, and replace
0 commit comments