UNPKG

@stryke/fs

Version:

A package containing various file system utilities that expand the functionality of NodeJs's built-in `fs` module.

44 lines 1.47 kB
//#region src/chmod-x.d.ts /** * Adds execute permissions to a file * * @param file - The file to add execute permissions to */ declare function chmodXSync(file: string): void; /** * Adds execute permissions to a file * * @param file - The file to add execute permissions to */ 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 */ 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 */ 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 */ 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 */ declare function isExecutableSync(filename: string): boolean; //#endregion export { chmodX, chmodXSync, isExecutable, isExecutableSync, isWritable, isWritableSync }; //# sourceMappingURL=chmod-x.d.mts.map