async function fileExists(filename) {
	try {
		await fs.promises.access(filename, fs.constants.F_OK);
		return true;
	} catch (e) {}
	return false;
}
/**
 * Check if a given file exists and can be accessed.
 * @param {string} filename
 */
Check if a given file exists and can be accessed.
@param {string} filename
Check if a given file exists and can be accessed . @param { string } filename
async function fileExists(filename) {
	try {
		await fs.promises.access(filename, fs.constants.F_OK);
		return true;
	} catch (e) {}
	return false;
}
async function fileExists ( filename ) { try { await fs . promises . access ( filename , fs . constants . F_OK ) ; return true ; } catch ( e ) { } return false ; }
Check if a given file exists and can be accessed.
Check if a given file exists and can be accessed .