imdone-core
Version:
52 lines (51 loc) • 1.99 kB
TypeScript
export function exists(path: any): Promise<false | _fs.Stats>;
export function statSync(path: any): _fs.Stats | undefined;
export function init(fileSystem?: typeof _fs): void;
export function existsSync(...args: any[]): boolean;
export function readFileSync(...args: any[]): string | NonSharedBuffer;
export function appendFileSync(...args: any[]): void;
export function writeFileSync(...args: any[]): void;
export function readdir(...args: any[]): Promise<_fs.Dirent<Buffer<ArrayBufferLike>>[]>;
export function unlinkSync(...args: any[]): void;
export function readdirSyncRecursive(path: any): any[];
export function readdirSync(path: any): _fs.Dirent<string>[];
export function sanitizeFileName(fileName: any, replaceSpacesWith: any): any;
export function preparePathForWriting(path: any, directory?: boolean): Promise<{
isFile: any;
isDirectory: any;
}>;
export function cp(src: any, dest: any, opts: any): Promise<void>;
export function rm(path: any, opts: any): Promise<void>;
export const sep: "/" | "\\";
export const stat: typeof _fs.promises.stat;
export const lstat: typeof _fs.promises.lstat;
export const lstatSync: _fs.StatSyncFn;
export const writeFile: typeof _fs.promises.writeFile;
export const unlink: typeof _fs.promises.unlink;
export const mkdir: typeof _fs.promises.mkdir;
export const readFile: typeof _fs.promises.readFile;
declare namespace _default {
export { cp };
export { rm };
export { exists };
export { stat };
export { lstat };
export { lstatSync };
export { readFileSync };
export { appendFileSync };
export { writeFileSync };
export { writeFile };
export { readdir };
export { unlink };
export { mkdir };
export { readFile };
export { readdirSyncRecursive };
export { readdirSync };
export { sanitizeFileName };
export { preparePathForWriting };
export { unlinkSync };
export { existsSync };
export { sep };
}
export default _default;
import _fs from 'fs';