bare-fs 4.6.0 → 4.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -116,6 +116,28 @@ export class Stats {
116
116
  )
117
117
  }
118
118
 
119
+ export interface StatFs {
120
+ readonly type: number
121
+ readonly bsize: number
122
+ readonly blocks: number
123
+ readonly bfree: number
124
+ readonly bavail: number
125
+ readonly files: number
126
+ readonly ffree: number
127
+ }
128
+
129
+ export class StatsFs {
130
+ private constructor(
131
+ type: number,
132
+ bsize: number,
133
+ blocks: number,
134
+ bfree: number,
135
+ bavail: number,
136
+ files: number,
137
+ ffree: number
138
+ )
139
+ }
140
+
119
141
  export interface ReadStreamOptions {
120
142
  fd?: number
121
143
  flags?: Flag
@@ -247,6 +269,12 @@ export function chmod(filepath: Path, mode: string | number, cb: Callback): void
247
269
 
248
270
  export function chmodSync(filepath: Path, mode: string | number): void
249
271
 
272
+ export function chown(filepath: Path, uid: number, gid: number): Promise<void>
273
+
274
+ export function chown(filepath: Path, uid: number, gid: number, cb: Callback): void
275
+
276
+ export function chownSync(filepath: Path, uid: number, gid: number): void
277
+
250
278
  export function close(fd: number): Promise<void>
251
279
 
252
280
  export function close(fd: number, cb: Callback): void
@@ -285,12 +313,30 @@ export function fchmod(fd: number, mode: string | number, cb: Callback): void
285
313
 
286
314
  export function fchmodSync(fd: number, mode: string | number): void
287
315
 
316
+ export function fchown(fd: number, uid: number, gid: number): Promise<void>
317
+
318
+ export function fchown(fd: number, uid: number, gid: number, cb: Callback): void
319
+
320
+ export function fchownSync(fd: number, uid: number, gid: number): void
321
+
322
+ export function fdatasync(fd: number): Promise<void>
323
+
324
+ export function fdatasync(fd: number, cb: Callback): void
325
+
326
+ export function fdatasyncSync(fd: number): void
327
+
288
328
  export function fstat(fd: number): Promise<Stats>
289
329
 
290
330
  export function fstat(fd: number, cb: Callback<[stats: Stats | null]>): void
291
331
 
292
332
  export function fstatSync(fd: number): Stats
293
333
 
334
+ export function fsync(fd: number): Promise<void>
335
+
336
+ export function fsync(fd: number, cb: Callback): void
337
+
338
+ export function fsyncSync(fd: number): void
339
+
294
340
  export function ftruncate(fd: number, len?: number): Promise<void>
295
341
 
296
342
  export function ftruncate(fd: number, len: number, cb: Callback): void
@@ -299,12 +345,52 @@ export function ftruncate(fd: number, cb: Callback): void
299
345
 
300
346
  export function ftruncateSync(fd: number, len?: number): void
301
347
 
348
+ export function lchown(filepath: Path, uid: number, gid: number): Promise<void>
349
+
350
+ export function lchown(filepath: Path, uid: number, gid: number, cb: Callback): void
351
+
352
+ export function lchownSync(filepath: Path, uid: number, gid: number): void
353
+
302
354
  export function lstat(filepath: Path): Promise<Stats>
303
355
 
304
356
  export function lstat(filepath: Path, cb: Callback<[stats: Stats | null]>): void
305
357
 
306
358
  export function lstatSync(filepath: Path): Stats
307
359
 
360
+ export function utimes(filepath: Path, atime: number | Date, mtime: number | Date): Promise<void>
361
+
362
+ export function utimes(
363
+ filepath: Path,
364
+ atime: number | Date,
365
+ mtime: number | Date,
366
+ cb: Callback
367
+ ): void
368
+
369
+ export function utimesSync(filepath: Path, atime: number | Date, mtime: number | Date): void
370
+
371
+ export function lutimes(filepath: Path, atime: number | Date, mtime: number | Date): Promise<void>
372
+
373
+ export function lutimes(
374
+ filepath: Path,
375
+ atime: number | Date,
376
+ mtime: number | Date,
377
+ cb: Callback
378
+ ): void
379
+
380
+ export function lutimesSync(filepath: Path, atime: number | Date, mtime: number | Date): void
381
+
382
+ export function futimes(fd: number, atime: number | Date, mtime: number | Date): Promise<void>
383
+
384
+ export function futimes(fd: number, atime: number | Date, mtime: number | Date, cb: Callback): void
385
+
386
+ export function futimesSync(fd: number, atime: number | Date, mtime: number | Date): void
387
+
388
+ export function link(src: Path, dst: Path): Promise<void>
389
+
390
+ export function link(src: Path, dst: Path, cb: Callback): void
391
+
392
+ export function linkSync(src: Path, dst: Path): void
393
+
308
394
  export interface MkdirOptions {
309
395
  mode?: number
310
396
  recursive?: boolean
@@ -324,6 +410,12 @@ export function mkdirSync(filepath: Path, opts?: MkdirOptions): void
324
410
 
325
411
  export function mkdirSync(filepath: Path, mode: number): void
326
412
 
413
+ export function mkdtemp(prefix: Path): Promise<string>
414
+
415
+ export function mkdtemp(prefix: Path, cb: Callback<[path: string | null]>): void
416
+
417
+ export function mkdtempSync(prefix: Path): string
418
+
327
419
  export function open(filepath: Path, flags?: Flag | number, mode?: string | number): Promise<number>
328
420
 
329
421
  export function open(
@@ -935,6 +1027,12 @@ export function stat(filepath: Path, cb: Callback<[stats: Stats | null]>): void
935
1027
 
936
1028
  export function statSync(filepath: Path): Stats
937
1029
 
1030
+ export function statfs(filepath: Path): Promise<StatFs>
1031
+
1032
+ export function statfs(filepath: Path, cb: Callback<[stats: StatFs | null]>): void
1033
+
1034
+ export function statfsSync(filepath: Path): StatFs
1035
+
938
1036
  export function symlink(target: Path, filepath: Path, type?: string | number): Promise<void>
939
1037
 
940
1038
  export function symlink(target: Path, filepath: Path, type: string | number, cb: Callback): void
@@ -943,6 +1041,14 @@ export function symlink(target: string, filepath: Path, cb: Callback): void
943
1041
 
944
1042
  export function symlinkSync(target: string, filepath: Path, type?: string | number): void
945
1043
 
1044
+ export function truncate(filepath: Path, len?: number): Promise<void>
1045
+
1046
+ export function truncate(filepath: Path, len: number, cb: Callback): void
1047
+
1048
+ export function truncate(filepath: Path, cb: Callback): void
1049
+
1050
+ export function truncateSync(filepath: Path, len?: number): void
1051
+
946
1052
  export function unlink(filepath: Path): Promise<void>
947
1053
 
948
1054
  export function unlink(filepath: Path, cb: Callback): void