UNPKG

@sidekick-coder/db

Version:

Cli Tool to manipulate data from diferent sources

50 lines (47 loc) 2.28 kB
import path from 'path'; declare function fileExists(path: string): Promise<boolean>; declare function readFile(path: string): Promise<Uint8Array>; declare namespace readFile { var text: (filepath: string, defaultValue?: string) => Promise<string>; var json: (path: string, options?: any) => Promise<any>; var yaml: (path: string, options?: any) => Promise<any>; } declare function readFileSync(path: string): Uint8Array; declare namespace readFileSync { var text: (filepath: string, defaultValue?: string) => string; var json: (path: string, options: any) => any; var yaml: (path: string, options?: any) => any; } declare function readDir(path: string, options?: any): Promise<string[]>; declare function readDirSync(path: string, options?: any): string[]; declare function copy(source: string, destination: string, options?: any): Promise<void>; declare function mkdir(filepath: string, options?: any): Promise<void>; declare function writeFile(filename: string, content: Uint8Array, options?: any): Promise<void>; declare namespace writeFile { var text: (filename: string, content: string, options?: any) => Promise<void>; var json: (filename: string, content: any, options?: any) => Promise<void>; } declare function writeFileSync(filename: string, content: Uint8Array, options?: any): void; declare namespace writeFileSync { var text: (filename: string, content: string, options?: any) => void; var json: (filename: string, content: any, options?: any) => void; } declare function resolve(url: string, ...args: string[]): string; declare function removeFile(path: string): Promise<void>; declare function removeFileSync(path: string): void; declare const filesystem: { path: path.PlatformPath; resolve: typeof resolve; exists: typeof fileExists; read: typeof readFile; readSync: typeof readFileSync; readdir: typeof readDir; readdirSync: typeof readDirSync; copy: typeof copy; write: typeof writeFile; writeSync: typeof writeFileSync; mkdir: typeof mkdir; remove: typeof removeFile; removeSync: typeof removeFileSync; }; export { copy, fileExists, filesystem, mkdir, readDir, readDirSync, readFile, readFileSync, removeFile, removeFileSync, resolve, writeFile, writeFileSync };