add ensureFile and ensureFileSync
This commit is contained in:
24
dist/smartfile.fs.d.ts
vendored
24
dist/smartfile.fs.d.ts
vendored
@ -21,6 +21,14 @@ export declare let isDirectory: (pathArg: any) => boolean;
|
||||
* Checks if a given path points to an existing file
|
||||
*/
|
||||
export declare let isFile: (pathArg: any) => boolean;
|
||||
/**
|
||||
* copies a file from A to B on the local disk
|
||||
*/
|
||||
export declare let copy: (fromArg: string, toArg: string) => plugins.q.Promise<{}>;
|
||||
/**
|
||||
* copies a file SYNCHRONOUSLY from A to B on the local disk
|
||||
*/
|
||||
export declare let copySync: (fromArg: string, toArg: string) => boolean;
|
||||
/**
|
||||
* ensures that a directory is in place
|
||||
*/
|
||||
@ -30,13 +38,21 @@ export declare let ensureDir: (dirPathArg: string) => plugins.q.Promise<{}>;
|
||||
*/
|
||||
export declare let ensureDirSync: (dirPathArg: string) => void;
|
||||
/**
|
||||
* copies a file from A to B on the local disk
|
||||
* 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
|
||||
*/
|
||||
export declare let copy: (fromArg: string, toArg: string) => plugins.q.Promise<{}>;
|
||||
export declare let ensureFile: (filePathArg: any, initFileStringArg: any) => plugins.q.Promise<void>;
|
||||
/**
|
||||
* copies a file SYNCHRONOUSLY from A to B on the local disk
|
||||
* 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
|
||||
*/
|
||||
export declare let copySync: (fromArg: string, toArg: string) => boolean;
|
||||
export declare let ensureFileSync: (filePathArg: string, initFileStringArg: string) => void;
|
||||
/**
|
||||
* removes a file or folder from local disk
|
||||
*/
|
||||
|
59
dist/smartfile.fs.js
vendored
59
dist/smartfile.fs.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user