diff --git a/doc/api/fs.md b/doc/api/fs.md index 5df0c5a5bfda2e..e65f6c7d4d2885 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -2274,7 +2274,10 @@ changes: Creates a unique temporary directory. Generates six random characters to be appended behind a required -`prefix` to create a unique temporary directory. +`prefix` to create a unique temporary directory. Due to platform +inconsistencies, avoid trailing `X` characters in `prefix`. Some platforms, +notably the BSDs, can return more than six random characters, and replace +trailing `X` characters in `prefix` with random characters. The created folder path is passed as a string to the callback's second parameter. @@ -4267,7 +4270,10 @@ added: v10.0.0 Creates a unique temporary directory and resolves the `Promise` with the created folder path. A unique directory name is generated by appending six random -characters to the end of the provided `prefix`. +characters to the end of the provided `prefix`. Due to platform +inconsistencies, avoid trailing `X` characters in `prefix`. Some platforms, +notably the BSDs, can return more than six random characters, and replace +trailing `X` characters in `prefix` with random characters. The optional `options` argument can be a string specifying an encoding, or an object with an `encoding` property specifying the character encoding to use.