2016-09-20 15:56:49 +00:00
|
|
|
import 'typings-global';
|
2016-06-24 01:36:51 +00:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @param filePath
|
|
|
|
* @returns {boolean}
|
|
|
|
*/
|
|
|
|
export declare let fileExistsSync: (filePath: any) => boolean;
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @param filePath
|
|
|
|
* @returns {any}
|
|
|
|
*/
|
2017-01-20 23:47:48 +00:00
|
|
|
export declare let fileExists: (filePath: any) => Promise<{}>;
|
2016-06-24 01:36:51 +00:00
|
|
|
/**
|
|
|
|
* Checks if given path points to an existing directory
|
|
|
|
*/
|
|
|
|
export declare let isDirectory: (pathArg: any) => boolean;
|
|
|
|
/**
|
|
|
|
* Checks if a given path points to an existing file
|
|
|
|
*/
|
|
|
|
export declare let isFile: (pathArg: any) => boolean;
|
2016-09-24 19:42:45 +00:00
|
|
|
/**
|
|
|
|
* copies a file from A to B on the local disk
|
|
|
|
*/
|
2017-01-20 23:47:48 +00:00
|
|
|
export declare let copy: (fromArg: string, toArg: string) => Promise<{}>;
|
2016-09-24 19:42:45 +00:00
|
|
|
/**
|
|
|
|
* copies a file SYNCHRONOUSLY from A to B on the local disk
|
|
|
|
*/
|
|
|
|
export declare let copySync: (fromArg: string, toArg: string) => boolean;
|
2016-06-28 04:57:51 +00:00
|
|
|
/**
|
|
|
|
* ensures that a directory is in place
|
|
|
|
*/
|
2017-01-20 23:47:48 +00:00
|
|
|
export declare let ensureDir: (dirPathArg: string) => Promise<{}>;
|
2016-06-28 04:57:51 +00:00
|
|
|
/**
|
|
|
|
* ensures that a directory is in place
|
|
|
|
*/
|
|
|
|
export declare let ensureDirSync: (dirPathArg: string) => void;
|
2017-01-01 01:45:53 +00:00
|
|
|
/**
|
|
|
|
* ensure an empty directory
|
|
|
|
* @executes ASYNC
|
|
|
|
*/
|
2017-01-20 23:47:48 +00:00
|
|
|
export declare let ensureEmptyDir: (dirPathArg: string) => Promise<{}>;
|
2017-01-01 01:45:53 +00:00
|
|
|
/**
|
|
|
|
* ensure an empty directory
|
|
|
|
* @executes SYNC
|
|
|
|
*/
|
|
|
|
export declare let ensureEmptyDirSync: (dirPathArg: string) => void;
|
2016-06-23 16:39:02 +00:00
|
|
|
/**
|
2016-09-24 19:42:45 +00:00
|
|
|
* 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<void>
|
|
|
|
* @exec ASYNC
|
2016-06-23 16:39:02 +00:00
|
|
|
*/
|
2017-01-20 23:47:48 +00:00
|
|
|
export declare let ensureFile: (filePathArg: any, initFileStringArg: any) => Promise<void>;
|
2016-06-23 16:39:02 +00:00
|
|
|
/**
|
2016-09-24 19:42:45 +00:00
|
|
|
* 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<void>
|
|
|
|
* @exec SYNC
|
2016-06-23 16:39:02 +00:00
|
|
|
*/
|
2016-09-24 19:42:45 +00:00
|
|
|
export declare let ensureFileSync: (filePathArg: string, initFileStringArg: string) => void;
|
2016-06-23 16:39:02 +00:00
|
|
|
/**
|
|
|
|
* removes a file or folder from local disk
|
|
|
|
*/
|
2017-01-20 23:47:48 +00:00
|
|
|
export declare let remove: (pathArg: string) => Promise<void>;
|
2016-06-23 16:39:02 +00:00
|
|
|
/**
|
|
|
|
* removes a file SYNCHRONOUSLY from local disk
|
|
|
|
*/
|
2016-06-23 16:31:55 +00:00
|
|
|
export declare let removeSync: (pathArg: string) => boolean;
|
2016-09-29 12:17:46 +00:00
|
|
|
/**
|
|
|
|
* removes an array of filePaths from disk
|
|
|
|
*/
|
2017-01-20 23:47:48 +00:00
|
|
|
export declare let removeMany: (filePathArrayArg: string[]) => Promise<void[]>;
|
2016-09-29 12:17:46 +00:00
|
|
|
/**
|
|
|
|
* like removeFilePathArray but SYNCHRONOUSLY
|
|
|
|
*/
|
2016-09-30 14:16:11 +00:00
|
|
|
export declare let removeManySync: (filePathArrayArg: string[]) => void;
|
2016-05-01 21:19:54 +00:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @param filePathArg
|
|
|
|
* @param fileTypeArg
|
|
|
|
* @returns {any}
|
|
|
|
*/
|
|
|
|
export declare let toObjectSync: (filePathArg: any, fileTypeArg?: any) => any;
|
|
|
|
/**
|
|
|
|
* reads a file content to a String
|
|
|
|
* @param filePath
|
|
|
|
* @returns {string|Buffer|any}
|
|
|
|
*/
|
2017-01-01 01:45:53 +00:00
|
|
|
export declare let toStringSync: (filePath: any) => any;
|
2016-05-01 21:19:54 +00:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @param filePathArg
|
|
|
|
* @param options
|
|
|
|
* @returns {number}
|
|
|
|
*/
|
|
|
|
export declare let toVinylSync: (filePathArg: any, options?: {}) => any;
|
|
|
|
/**
|
|
|
|
* lets you reload files hot.
|
|
|
|
* @param path
|
|
|
|
* @returns {any}
|
|
|
|
*/
|
|
|
|
export declare let requireReload: (path: string) => any;
|
2016-06-23 16:39:02 +00:00
|
|
|
/**
|
|
|
|
* lists Folders in a directory on local disk
|
2016-06-28 04:57:51 +00:00
|
|
|
* @returns Promise
|
2016-06-23 16:39:02 +00:00
|
|
|
*/
|
2017-01-20 23:47:48 +00:00
|
|
|
export declare let listFolders: (pathArg: string, regexFilter?: RegExp) => Promise<{}>;
|
2016-06-23 16:39:02 +00:00
|
|
|
/**
|
|
|
|
* lists Folders SYNCHRONOUSLY in a directory on local disk
|
2016-06-28 04:57:51 +00:00
|
|
|
* @returns an array with the folder names as strings
|
2016-06-23 16:39:02 +00:00
|
|
|
*/
|
2016-06-28 06:40:22 +00:00
|
|
|
export declare let listFoldersSync: (pathArg: string, regexFilter?: RegExp) => string[];
|
|
|
|
/**
|
|
|
|
* lists Files in a directory on local disk
|
|
|
|
* @returns Promise
|
|
|
|
*/
|
2017-01-20 23:47:48 +00:00
|
|
|
export declare let listFiles: (pathArg: string, regexFilter?: RegExp) => Promise<{}>;
|
2016-06-28 06:40:22 +00:00
|
|
|
/**
|
|
|
|
* lists Files SYNCHRONOUSLY in a directory on local disk
|
|
|
|
* @returns an array with the folder names as strings
|
|
|
|
*/
|
|
|
|
export declare let listFilesSync: (pathArg: string, regexFilter?: RegExp) => string[];
|
|
|
|
/**
|
|
|
|
* lists all items (folders AND files) in a directory on local disk
|
2016-09-17 21:11:44 +00:00
|
|
|
* @returns Promise<string[]>
|
2016-06-28 06:40:22 +00:00
|
|
|
*/
|
2017-01-20 23:47:48 +00:00
|
|
|
export declare let listAllItems: (pathArg: string, regexFilter?: RegExp) => Promise<string[]>;
|
2016-06-28 06:40:22 +00:00
|
|
|
/**
|
2016-09-17 21:11:44 +00:00
|
|
|
* lists all items (folders AND files) in a directory on local disk
|
2016-06-28 06:40:22 +00:00
|
|
|
* @returns an array with the folder names as strings
|
2016-09-17 21:11:44 +00:00
|
|
|
* @executes SYNC
|
2016-06-28 06:40:22 +00:00
|
|
|
*/
|
|
|
|
export declare let listAllItemsSync: (pathArg: string, regexFilter?: RegExp) => string[];
|
2016-09-17 21:11:44 +00:00
|
|
|
/**
|
|
|
|
* lists a file tree using a miniMatch filter
|
2016-09-30 14:16:11 +00:00
|
|
|
* note: if the miniMatch Filter is an absolute path, the cwdArg will be omitted
|
2016-09-17 21:11:44 +00:00
|
|
|
* @returns Promise<string[]> string array with the absolute paths of all matching files
|
|
|
|
*/
|
2017-01-20 23:47:48 +00:00
|
|
|
export declare let listFileTree: (dirPathArg: string, miniMatchFilter: string) => Promise<string[]>;
|