@techmely/utils
Version:
Collection of helpful JavaScript / TypeScript utils
22 lines (18 loc) • 331 B
JavaScript
/*!
* @techmely/utils
* Copyright(c) 2021-2024 Techmely <techmely.creation@gmail.com>
* MIT Licensed
*/
// src/isFileReadable.ts
import fs from "fs";
function isFileReadable(filename) {
try {
fs.accessSync(filename, fs.constants.R_OK);
return true;
} catch {
return false;
}
}
export {
isFileReadable
};