bare-fs 4.5.6 → 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/README.md +960 -1
- package/binding.c +616 -0
- package/index.d.ts +108 -0
- package/index.js +455 -69
- package/package.json +6 -3
- package/prebuilds/android-arm/bare-fs.bare +0 -0
- package/prebuilds/android-arm64/bare-fs.bare +0 -0
- package/prebuilds/android-ia32/bare-fs.bare +0 -0
- package/prebuilds/android-x64/bare-fs.bare +0 -0
- package/prebuilds/darwin-arm64/bare-fs.bare +0 -0
- package/prebuilds/darwin-x64/bare-fs.bare +0 -0
- package/prebuilds/ios-arm64/bare-fs.bare +0 -0
- package/prebuilds/ios-arm64-simulator/bare-fs.bare +0 -0
- package/prebuilds/ios-x64-simulator/bare-fs.bare +0 -0
- package/prebuilds/linux-arm64/bare-fs.bare +0 -0
- package/prebuilds/linux-x64/bare-fs.bare +0 -0
- package/prebuilds/win32-arm64/bare-fs.bare +0 -0
- package/prebuilds/win32-x64/bare-fs.bare +0 -0
- package/promises.d.ts +28 -0
- package/promises.js +30 -1
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
|
|
@@ -271,6 +299,8 @@ export function cp(src: Path, dst: Path, opts: CpOptions, cb: Callback): void
|
|
|
271
299
|
|
|
272
300
|
export function cp(src: Path, dst: Path, cb: Callback): void
|
|
273
301
|
|
|
302
|
+
export function cpSync(src: Path, dst: Path, opts?: CpOptions): void
|
|
303
|
+
|
|
274
304
|
export function exists(filepath: Path): Promise<boolean>
|
|
275
305
|
|
|
276
306
|
export function exists(filepath: Path, cb: (exists: boolean) => void): void
|
|
@@ -283,12 +313,30 @@ export function fchmod(fd: number, mode: string | number, cb: Callback): void
|
|
|
283
313
|
|
|
284
314
|
export function fchmodSync(fd: number, mode: string | number): void
|
|
285
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
|
+
|
|
286
328
|
export function fstat(fd: number): Promise<Stats>
|
|
287
329
|
|
|
288
330
|
export function fstat(fd: number, cb: Callback<[stats: Stats | null]>): void
|
|
289
331
|
|
|
290
332
|
export function fstatSync(fd: number): Stats
|
|
291
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
|
+
|
|
292
340
|
export function ftruncate(fd: number, len?: number): Promise<void>
|
|
293
341
|
|
|
294
342
|
export function ftruncate(fd: number, len: number, cb: Callback): void
|
|
@@ -297,12 +345,52 @@ export function ftruncate(fd: number, cb: Callback): void
|
|
|
297
345
|
|
|
298
346
|
export function ftruncateSync(fd: number, len?: number): void
|
|
299
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
|
+
|
|
300
354
|
export function lstat(filepath: Path): Promise<Stats>
|
|
301
355
|
|
|
302
356
|
export function lstat(filepath: Path, cb: Callback<[stats: Stats | null]>): void
|
|
303
357
|
|
|
304
358
|
export function lstatSync(filepath: Path): Stats
|
|
305
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
|
+
|
|
306
394
|
export interface MkdirOptions {
|
|
307
395
|
mode?: number
|
|
308
396
|
recursive?: boolean
|
|
@@ -322,6 +410,12 @@ export function mkdirSync(filepath: Path, opts?: MkdirOptions): void
|
|
|
322
410
|
|
|
323
411
|
export function mkdirSync(filepath: Path, mode: number): void
|
|
324
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
|
+
|
|
325
419
|
export function open(filepath: Path, flags?: Flag | number, mode?: string | number): Promise<number>
|
|
326
420
|
|
|
327
421
|
export function open(
|
|
@@ -933,6 +1027,12 @@ export function stat(filepath: Path, cb: Callback<[stats: Stats | null]>): void
|
|
|
933
1027
|
|
|
934
1028
|
export function statSync(filepath: Path): Stats
|
|
935
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
|
+
|
|
936
1036
|
export function symlink(target: Path, filepath: Path, type?: string | number): Promise<void>
|
|
937
1037
|
|
|
938
1038
|
export function symlink(target: Path, filepath: Path, type: string | number, cb: Callback): void
|
|
@@ -941,6 +1041,14 @@ export function symlink(target: string, filepath: Path, cb: Callback): void
|
|
|
941
1041
|
|
|
942
1042
|
export function symlinkSync(target: string, filepath: Path, type?: string | number): void
|
|
943
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
|
+
|
|
944
1052
|
export function unlink(filepath: Path): Promise<void>
|
|
945
1053
|
|
|
946
1054
|
export function unlink(filepath: Path, cb: Callback): void
|