default: {
archive: ((target: string, directory: {
C: string;
path: string;
}) => Promise<void>);
convert: ((location: string, file: {
name: string;
target: string;
}, callback?: ((data: {
data?: string;
error?: string;
}) => void), param?: {
isResult: boolean;
}) => Promise<{
brep?: string;
glb: string;
name: string;
}[]>);
copyDirectory: ((origin: string, destination: string) => Promise<void>);
copyFile: ((origin: {
file: string;
path: string;
}, destination: {
file: string;
path: string;
}) => Promise<void>);
createPath: ((location: string) => Promise<void>);
decrypt: ((hash: {
content: string;
iv: string;
}) => Promise<string>);
encrypt: ((text: string) => Promise<{
content: string;
iv: string;
}>);
listDirectories: ((location: string) => Promise<string[]>);
listFiles: ((location: string) => Promise<Dirent[]>);
readFile: ((file: string, options?: any) => Promise<Buffer>);
readJSONFile: ((file: string) => Promise<any>);
readStream: ((file: string) => ReadStream);
removeDirectory: ((dir: string) => Promise<void>);
removeFile: ((file: string) => Promise<void>);
splitStep: ((location: string, fileIn: string) => Promise<string[]>);
toPosix: ((str: string) => string);
unarchive: ((source: string, directory: {
C: string;
path: string;
}) => Promise<void>);
writeFile: ((location: string, name: string, content: string | Buffer) => Promise<void>);
writeStream: ((file: string) => WriteStream);
} = ...
Type declaration
archive: ((target: string, directory: {
C: string;
path: string;
}) => Promise<void>)
- (target, directory): Promise<void>
Parameters
- target: string
- directory: {
C: string;
path: string;
}
Returns Promise<void>
convert: ((location: string, file: {
name: string;
target: string;
}, callback?: ((data: {
data?: string;
error?: string;
}) => void), param?: {
isResult: boolean;
}) => Promise<{
brep?: string;
glb: string;
name: string;
}[]>)
- (location, file, callback?, param?): Promise<{
brep?: string;
glb: string;
name: string;
}[]> Parameters
- location: string
- file: {
name: string;
target: string;
}name: string
target: string
Optional
callback: ((data: {
data?: string;
error?: string;
}) => void)- (data): void
Parameters
- data: {
data?: string;
error?: string;
}Optional
data?: string
Optional
error?: string
Returns void
Optional
param: {
isResult: boolean;
}
Returns Promise<{
brep?: string;
glb: string;
name: string;
}[]>
Data
copyDirectory: ((origin: string, destination: string) => Promise<void>)
- (origin, destination): Promise<void>
Parameters
- origin: string
- destination: string
Returns Promise<void>
copyFile: ((origin: {
file: string;
path: string;
}, destination: {
file: string;
path: string;
}) => Promise<void>)
- (origin, destination): Promise<void>
Parameters
- origin: {
file: string;
path: string;
} - destination: {
file: string;
path: string;
}
Returns Promise<void>
createPath: ((location: string) => Promise<void>)
- (location): Promise<void>
Returns Promise<void>
decrypt: ((hash: {
content: string;
iv: string;
}) => Promise<string>)
- (hash): Promise<string>
Parameters
- hash: {
content: string;
iv: string;
}content: string
iv: string
Returns Promise<string>
Decrypted text
encrypt: ((text: string) => Promise<{
content: string;
iv: string;
}>)
- (text): Promise<{
content: string;
iv: string;
}> Returns Promise<{
content: string;
iv: string;
}>
Hash
listDirectories: ((location: string) => Promise<string[]>)
- (location): Promise<string[]>
Returns Promise<string[]>
Directory list
listFiles: ((location: string) => Promise<Dirent[]>)
- (location): Promise<Dirent[]>
Returns Promise<Dirent[]>
Files list (with types)
readFile: ((file: string, options?: any) => Promise<Buffer>)
- (file, options?): Promise<Buffer>
Parameters
- file: string
Optional
options: any
Returns Promise<Buffer>
File content
readJSONFile: ((file: string) => Promise<any>)
- (file): Promise<any>
Returns Promise<any>
readStream: ((file: string) => ReadStream)
- (file): ReadStream
Returns ReadStream
Read stream
removeDirectory: ((dir: string) => Promise<void>)
- (dir): Promise<void>
Returns Promise<void>
removeFile: ((file: string) => Promise<void>)
- (file): Promise<void>
Returns Promise<void>
splitStep: ((location: string, fileIn: string) => Promise<string[]>)
- (location, fileIn): Promise<string[]>
Parameters
- location: string
- fileIn: string
Returns Promise<string[]>
toPosix: ((str: string) => string)
- (str): string
Returns string
POSIX path
unarchive: ((source: string, directory: {
C: string;
path: string;
}) => Promise<void>)
- (source, directory): Promise<void>
Parameters
- source: string
- directory: {
C: string;
path: string;
}
Returns Promise<void>
writeFile: ((location: string, name: string, content: string | Buffer) => Promise<void>)
- (location, name, content): Promise<void>
Parameters
- location: string
- name: string
- content: string | Buffer
Returns Promise<void>
writeStream: ((file: string) => WriteStream)
- (file): WriteStream
Returns WriteStream
Write stream
Tar