You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -566,7 +566,7 @@ Creates a directory at given path. Not that the parent dir should exist for this
566
566
567
567
- **Parameters:**
568
568
- `path` _(string)_ - The path where the directory should be created.
569
-
- `mode` _(number|function)_ (Optional, default: `0o777`) - The directory permissions.
569
+
- `mode` _(number|function)_ (Optional, default: `0o666`) - The directory permissions.
570
570
- `callback` _(function)_ (Optional) - Callback to execute once directory creation is done. Called with an error as the first argument on failure, and null on success.
571
571
572
572
- **Examples:**
@@ -591,7 +591,7 @@ Creates a directory with optional mode and recursion (create all intermediate di
591
591
592
592
- **Parameters:**
593
593
- `path` _(string)_ - The path where the directory should be created.
594
-
- `mode` _(number|function)_ (Optional, default: `0o777`) - The directory permissions.
594
+
- `mode` _(number|function)_ (Optional, default: `0o666`) - The directory permissions.
- `callback` _(function)_ (Optional) - Callback to execute once directory creation is done. Called with an error as the first argument on failure, and null on success.
597
597
@@ -836,6 +836,7 @@ Writes data to a file, replacing the file if it already exists.
836
836
- If provided as an `object`, it can have the following properties:
837
837
-`encoding` (`string`): The type of encoding. Default is `'binary'`.
838
838
-`flag` (`string`): The file system flag. Default is `'w'`.
839
+
-`mode` (`number`): (Optional, default: `0o666`) - The permissions.
839
840
840
841
-**callback**: (`function`)
841
842
- The callback function executed once the file write operation concludes.
Copy file name to clipboardExpand all lines: src/fslib_tauri.js
+13-7Lines changed: 13 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -285,8 +285,8 @@ function readdir(path, options, callback) {
285
285
* Creates a directory with optional mode and recursion(create all intermediate directories if those don't exist).
286
286
*
287
287
* @param {string} path - The path where the directory should be created.
288
-
* @param {(number|function)} [mode=0o777] - The directory permissions. Defaults to `0o777` if not provided.
289
-
* @param {(boolean|function)} [recursive=false] - Whether to create directories recursively. Defaults to `false` if not provided.
288
+
* @param {(number)} [mode=0o666] - The directory permissions. Defaults to `0o666` if not provided.
289
+
* @param {(boolean)} [recursive=false] - Whether to create directories recursively. Defaults to `false` if not provided.
290
290
* @param {function} [callback] - Callback to execute once directory creation is done. Called with an error as the first argument on failure, and null on success.
291
291
*
292
292
* @example
@@ -309,7 +309,7 @@ function mkdirs(path, mode, recursive, callback) {
309
309
if(typeofmode!=='number'){
310
310
callback=recursive;
311
311
recursive=mode;
312
-
mode=0o777;// Default mode (or any other default you'd like to set)
312
+
mode=0o666;// Default mode (or any other default you'd like to set)
313
313
}
314
314
315
315
// Determine if 'recursive' is provided
@@ -325,6 +325,11 @@ function mkdirs(path, mode, recursive, callback) {
0 commit comments