import { Smartfile } from './smartfile.classes.smartfile.js'; /** * * @param filePath * @returns {boolean} */ export declare const fileExistsSync: (filePath: any) => boolean; /** * * @param filePath * @returns {any} */ export declare const fileExists: (filePath: any) => Promise; /** * Checks if given path points to an existing directory */ export declare const isDirectory: (pathArg: any) => boolean; /** * Checks if a given path points to an existing file */ export declare const isFile: (pathArg: any) => boolean; /** * copies a file from A to B on the local disk */ export declare const copy: (fromArg: string, toArg: string) => Promise; /** * copies a file SYNCHRONOUSLY from A to B on the local disk */ export declare const copySync: (fromArg: string, toArg: string) => boolean; /** * ensures that a directory is in place */ export declare const ensureDir: (dirPathArg: string) => Promise; /** * ensures that a directory is in place */ export declare const ensureDirSync: (dirPathArg: string) => void; /** * ensure an empty directory * @executes ASYNC */ export declare const ensureEmptyDir: (dirPathArg: string) => Promise; /** * ensure an empty directory * @executes SYNC */ export declare const ensureEmptyDirSync: (dirPathArg: string) => void; /** * ensures that a file is on disk * @param filePath the filePath to ensureDir * @param the fileContent to place into a new file in case it doesn't exist yet * @returns Promise * @exec ASYNC */ export declare const ensureFile: (filePathArg: any, initFileStringArg: any) => Promise; /** * ensures that a file is on disk * @param filePath the filePath to ensureDir * @param the fileContent to place into a new file in case it doesn't exist yet * @returns Promise * @exec SYNC */ export declare const ensureFileSync: (filePathArg: string, initFileStringArg: string) => void; /** * removes a file or folder from local disk */ export declare const remove: (pathArg: string) => Promise; /** * removes a file SYNCHRONOUSLY from local disk */ export declare const removeSync: (pathArg: string) => void; /** * removes an array of filePaths from disk */ export declare const removeMany: (filePathArrayArg: string[]) => Promise; /** * like removeFilePathArray but SYNCHRONOUSLY */ export declare const removeManySync: (filePathArrayArg: string[]) => void; /** * * @param filePathArg * @param fileTypeArg * @returns {any} */ export declare const toObjectSync: (filePathArg: any, fileTypeArg?: any) => any; /** * reads a file content to a String */ export declare const toStringSync: (filePath: string) => string; export declare const toBuffer: (filePath: string) => Promise; export declare const toBufferSync: (filePath: string) => Buffer; export declare const fileTreeToHash: (dirPathArg: string, miniMatchFilter: string) => Promise; /** * creates a smartfile array from a directory * @param dirPathArg the directory to start from * @param miniMatchFilter a minimatch filter of what files to include */ export declare const fileTreeToObject: (dirPathArg: string, miniMatchFilter: string) => Promise; /** * lists Folders in a directory on local disk * @returns Promise with an array that contains the folder names */ export declare const listFolders: (pathArg: string, regexFilter?: RegExp) => Promise; /** * lists Folders SYNCHRONOUSLY in a directory on local disk * @returns an array with the folder names as strings */ export declare const listFoldersSync: (pathArg: string, regexFilter?: RegExp) => string[]; /** * lists Files in a directory on local disk * @returns Promise */ export declare const listFiles: (pathArg: string, regexFilter?: RegExp) => Promise; /** * lists Files SYNCHRONOUSLY in a directory on local disk * @returns an array with the folder names as strings */ export declare const listFilesSync: (pathArg: string, regexFilter?: RegExp) => string[]; /** * lists all items (folders AND files) in a directory on local disk * @returns Promise */ export declare const listAllItems: (pathArg: string, regexFilter?: RegExp) => Promise; /** * lists all items (folders AND files) in a directory on local disk * @returns an array with the folder names as strings * @executes SYNC */ export declare const listAllItemsSync: (pathArg: string, regexFilter?: RegExp) => string[]; /** * lists a file tree using a miniMatch filter * note: if the miniMatch Filter is an absolute path, the cwdArg will be omitted * @returns Promise string array with the absolute paths of all matching files */ export declare const listFileTree: (dirPathArg: string, miniMatchFilter: string, absolutePathsBool?: boolean) => Promise; /** * checks wether a file is ready for processing */ export declare const waitForFileToBeReady: (filePathArg: string) => Promise;