@@ -49,7 +49,7 @@ trait Fs extends IEventEmitter {
49
49
val W_OK : FileMode = js.native
50
50
51
51
/**
52
- * File can be executed by the calling process. This has no effect on Windows (will behave like fs. [[F_OK ]]).
52
+ * File can be executed by the calling process. This has no effect on Windows (will behave like [[F_OK ]]).
53
53
*/
54
54
val X_OK : FileMode = js.native
55
55
@@ -195,9 +195,9 @@ trait Fs extends IEventEmitter {
195
195
* <ul>
196
196
* <li>fs.F_OK - File is visible to the calling process. This is useful for determining if a file exists,
197
197
* but says nothing about rwx permissions. Default if no mode is specified.</li>
198
- * <li>fs. [[R_OK ]] - File can be read by the calling process.</li>
199
- * <li>fs. [[W_OK ]] - File can be written by the calling process.</li>
200
- * <li>fs. [[X_OK ]] - File can be executed by the calling process. This has no effect on Windows (will behave like fs. [[F_OK ]]).</li>
198
+ * <li>[[R_OK ]] - File can be read by the calling process.</li>
199
+ * <li>[[W_OK ]] - File can be written by the calling process.</li>
200
+ * <li>[[X_OK ]] - File can be executed by the calling process. This has no effect on Windows (will behave like [[F_OK ]]).</li>
201
201
* </ul>
202
202
* @param path the path (Buffer | String)
203
203
* @param mode the optional mode
@@ -214,9 +214,9 @@ trait Fs extends IEventEmitter {
214
214
* <ul>
215
215
* <li>fs.F_OK - File is visible to the calling process. This is useful for determining if a file exists,
216
216
* but says nothing about rwx permissions. Default if no mode is specified.</li>
217
- * <li>fs. [[R_OK ]] - File can be read by the calling process.</li>
218
- * <li>fs. [[W_OK ]] - File can be written by the calling process.</li>
219
- * <li>fs. [[X_OK ]] - File can be executed by the calling process. This has no effect on Windows (will behave like fs. [[F_OK ]]).</li>
217
+ * <li>[[R_OK ]] - File can be read by the calling process.</li>
218
+ * <li>[[W_OK ]] - File can be written by the calling process.</li>
219
+ * <li>[[X_OK ]] - File can be executed by the calling process. This has no effect on Windows (will behave like [[F_OK ]]).</li>
220
220
* </ul>
221
221
* @param path the path (Buffer | String)
222
222
* @param callback is a callback function that is invoked with a possible error argument. If any of the accessibility
@@ -400,13 +400,14 @@ trait Fs extends IEventEmitter {
400
400
* @param fd the file descriptor
401
401
* @param callback the completion callback.
402
402
*/
403
- def fstat (fd : FileDescriptor , callback : FsCallback0 ): Unit = js.native
403
+ def fstat (fd : FileDescriptor , callback : FsCallback1 [ Stats ] ): Unit = js.native
404
404
405
405
/**
406
- * Synchronous fstat(2). Returns an instance of fs.Stats.
406
+ * Synchronous fstat(2).
407
407
* @param fd the file descriptor
408
+ * @return an instance of [[fs.Stats ]].
408
409
*/
409
- def fstatSync (fd : FileDescriptor ): Unit = js.native
410
+ def fstatSync (fd : FileDescriptor ): Stats = js.native
410
411
411
412
/**
412
413
* Asynchronous fsync(2). No arguments other than a possible exception are given to the completion callback.
@@ -424,21 +425,21 @@ trait Fs extends IEventEmitter {
424
425
425
426
/**
426
427
* Asynchronous ftruncate(2). No arguments other than a possible exception are given to the completion callback.
427
- * If the file referred to by the file descriptor was larger than len bytes, only the first len bytes will be
428
+ * If the file referred to by the file descriptor was larger than length bytes, only the first length bytes will be
428
429
* retained in the file.
429
430
* @param fd the file descriptor
430
- * @param len the desired length
431
+ * @param length the desired length
431
432
* @param callback the completion callback.
432
433
*/
433
- def ftruncate (fd : FileDescriptor , len : Double , callback : FsCallback0 ): Unit = js.native
434
+ def ftruncate (fd : FileDescriptor , length : Double , callback : FsCallback0 ): Unit = js.native
434
435
435
436
/**
436
437
* Synchronous ftruncate(2).
437
- * @param fd the file descriptor
438
- * @param len the desired length
438
+ * @param fd the file descriptor
439
+ * @param length the desired length
439
440
* @return undefined.
440
441
*/
441
- def ftruncateSync (fd : FileDescriptor , len : Double ): Unit = js.native
442
+ def ftruncateSync (fd : FileDescriptor , length : Double ): Unit = js.native
442
443
443
444
/**
444
445
* Change the file timestamps of a file referenced by the supplied file descriptor.
@@ -516,7 +517,7 @@ trait Fs extends IEventEmitter {
516
517
/**
517
518
* Synchronous lstat(2).
518
519
* @param path the path (Buffer | String)
519
- * @return an instance of fs.Stats.
520
+ * @return an instance of [[ fs.Stats ]] .
520
521
*/
521
522
def lstatSync (path : Buffer | String ): Stats = js.native
522
523
@@ -525,7 +526,7 @@ trait Fs extends IEventEmitter {
525
526
* mode defaults to 0o777.
526
527
* @example fs.mkdir(path[, mode], callback)
527
528
*/
528
- def mkdir (path : Buffer | String , mode : FileMode | js. Any , callback : FsCallback0 ): Unit = js.native
529
+ def mkdir (path : Buffer | String , mode : FileMode , callback : FsCallback0 ): Unit = js.native
529
530
530
531
/**
531
532
* Asynchronous mkdir(2). No arguments other than a possible exception are given to the completion callback.
@@ -785,7 +786,7 @@ trait Fs extends IEventEmitter {
785
786
*/
786
787
def readlink (path : Buffer | String ,
787
788
options : String | FileEncodingOptions | RawOptions ,
788
- callback : js. Function2 [ FileIOError , String , Any ]): Unit = js.native
789
+ callback : FsCallback1 [ String ]): Unit = js.native
789
790
790
791
/**
791
792
* Synchronous readlink(2).
@@ -864,14 +865,14 @@ trait Fs extends IEventEmitter {
864
865
def rmdirSync (path : Buffer | String ): Unit = js.native
865
866
866
867
/**
867
- * Asynchronous stat(2). The callback gets two arguments (err, stats) where stats is a fs.[[ Stats ]] object.
868
+ * Asynchronous stat(2). The callback gets two arguments (err, stats) where stats is a [[ fs. Stats ]] object.
868
869
* See the fs.Stats section for more information.
869
870
* @example fs.stat(path, callback)
870
871
*/
871
872
def stat (path : Buffer | String , callback : FsCallback1 [Stats ]): Stats = js.native
872
873
873
874
/**
874
- * Synchronous stat(2). Returns an instance of fs.[[ Stats ]].
875
+ * Synchronous stat(2). Returns an instance of [[ fs. Stats ]].
875
876
* @example fs.statSync(path)
876
877
*/
877
878
def statSync (path : Buffer | String ): Stats = js.native
@@ -912,7 +913,7 @@ trait Fs extends IEventEmitter {
912
913
* @param path the path <String> | <Buffer>
913
914
* @param length the length
914
915
* @param callback the completion callback.
915
- * @example fs.truncate(path, len , callback)
916
+ * @example fs.truncate(path, length , callback)
916
917
*/
917
918
def truncate (path : Buffer | FileDescriptor | String , length : Int , callback : FsCallback0 ): Unit = js.native
918
919
@@ -922,7 +923,7 @@ trait Fs extends IEventEmitter {
922
923
* @param path the path or file descriptor - <String> | <Buffer> | <Integer>
923
924
* @param length the length
924
925
* @return undefined.
925
- * @example fs.truncateSync(path, len )
926
+ * @example fs.truncateSync(path, length )
926
927
*/
927
928
def truncateSync (path : Buffer | FileDescriptor | String , length : Int ): Unit = js.native
928
929
@@ -971,7 +972,7 @@ trait Fs extends IEventEmitter {
971
972
972
973
/**
973
974
* Watch for changes on filename, where filename is either a file or a directory.
974
- * The returned object is a fs.[[ FSWatcher ]].
975
+ * The returned object is a [[ fs. FSWatcher ]].
975
976
*
976
977
* The second argument is optional. If options is provided as a string, it specifies the encoding.
977
978
* Otherwise options should be passed as an object.
@@ -990,7 +991,7 @@ trait Fs extends IEventEmitter {
990
991
991
992
/**
992
993
* Watch for changes on filename, where filename is either a file or a directory.
993
- * The returned object is a fs.[[ FSWatcher ]].
994
+ * The returned object is a [[ fs. FSWatcher ]].
994
995
*
995
996
* The second argument is optional. If options is provided as a string, it specifies the encoding.
996
997
* Otherwise options should be passed as an object.
@@ -1008,7 +1009,7 @@ trait Fs extends IEventEmitter {
1008
1009
1009
1010
/**
1010
1011
* Watch for changes on filename, where filename is either a file or a directory.
1011
- * The returned object is a fs.[[ FSWatcher ]].
1012
+ * The returned object is a [[ fs. FSWatcher ]].
1012
1013
*
1013
1014
* The second argument is optional. If options is provided as a string, it specifies the encoding.
1014
1015
* Otherwise options should be passed as an object.
0 commit comments