@stryke/fs
Version:
A package containing various file system utilities that expand the functionality of NodeJs's built-in `fs` module.
41 lines (40 loc) • 1.34 kB
TypeScript
/**
* Adds execute permissions to a file
*
* @param file - The file to add execute permissions to
*/
export declare function chmodXSync(file: string): void;
/**
* Adds execute permissions to a file
*
* @param file - The file to add execute permissions to
*/
export declare function chmodX(file: string): Promise<void>;
/**
* Checks the write permission of a file
*
* @param filename - The file to check the permission of
* @returns A promise that resolves to true if the file is writable, false otherwise
*/
export declare function isWritable(filename: string): Promise<boolean>;
/**
* Checks the write permission of a file
*
* @param filename - The file to check the permission of
* @returns True if the file is writable, false otherwise
*/
export declare function isWritableSync(filename: string): boolean;
/**
* Checks the execute permission of a file
*
* @param filename - The file to check the permission of
* @returns A promise that resolves to true if the file is executable, false otherwise
*/
export declare function isExecutable(filename: string): Promise<boolean>;
/**
* Checks the execute permission of a file
*
* @param filename - The file to check the permission of
* @returns True if the file is executable, false otherwise
*/
export declare function isExecutableSync(filename: string): boolean;