ktfile 0.0.1

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.
@@ -0,0 +1,64 @@
1
+ export type IAsyncFS = Partial<{
2
+ constants: Partial<{
3
+ X_OK: number;
4
+ R_OK: number;
5
+ W_OK: number;
6
+ }>;
7
+ mkdtemp(prefix: string, options?: {
8
+ encoding?: BufferEncoding;
9
+ } | BufferEncoding): Promise<string>;
10
+ access(path: string, mode?: number): Promise<void>;
11
+ chmod(path: string, mode: number): Promise<void>;
12
+ stat(path: string, options?: {
13
+ bigint?: boolean;
14
+ } | boolean): Promise<Partial<{
15
+ birthtime: Date;
16
+ mtime: Date;
17
+ atime: Date;
18
+ size: number;
19
+ isDirectory(): boolean;
20
+ isFile(): boolean;
21
+ }>>;
22
+ utimes(path: string, atime: Date, mtime: Date): Promise<void>;
23
+ exists(path: string): Promise<boolean>;
24
+ lstat(path: string, options?: {
25
+ bigint?: boolean;
26
+ } | boolean): Promise<Partial<{
27
+ isSymbolicLink(): boolean;
28
+ }>>;
29
+ rm(path: string, options?: {
30
+ recursive?: boolean;
31
+ force?: boolean;
32
+ }): Promise<void>;
33
+ rmdir(path: string, options?: {
34
+ recursive?: boolean;
35
+ force?: boolean;
36
+ }): Promise<void>;
37
+ unlink(path: string, options?: {
38
+ force?: boolean;
39
+ }): Promise<void>;
40
+ readdir(path: string, options?: {
41
+ encoding?: BufferEncoding;
42
+ } | BufferEncoding): Promise<string[]>;
43
+ mkdir(path: string, options?: {
44
+ recursive?: boolean;
45
+ mode?: number;
46
+ } | {
47
+ mode?: number;
48
+ }): Promise<string>;
49
+ rename(oldPath: string, newPath: string): Promise<void>;
50
+ writeFile(path: string, data: string | Buffer, options?: {
51
+ encoding?: BufferEncoding;
52
+ } | BufferEncoding): Promise<void>;
53
+ readlink(path: string, options?: {
54
+ encoding?: BufferEncoding;
55
+ } | BufferEncoding): Promise<string>;
56
+ readFile(path: string, options?: {
57
+ encoding?: BufferEncoding;
58
+ } | BufferEncoding): Promise<string | Buffer>;
59
+ appendFile(path: string, data: string | Buffer, options?: BufferEncoding | {
60
+ encoding?: BufferEncoding;
61
+ mode?: number;
62
+ flag?: string;
63
+ }): Promise<void>;
64
+ }>;
@@ -0,0 +1,7 @@
1
+ import { FileSync } from "./sync/FileSync";
2
+ import { FileAsync } from "./async/FileAsync";
3
+ export { FileAsync } from "./async/FileAsync";
4
+ export { FileSync, FileSync as File } from "./sync/FileSync";
5
+ export declare function initFS(fs: typeof import("fs")): void;
6
+ export declare function fileSync(path: string): FileSync;
7
+ export declare function fileAsync(path: string): FileAsync;