@inlang/paraglide-js
Version:
[](https://www.npmjs.com/package/@inlang/paraglide-js) [, false otherwise.
*
* @param nodeishFs
* @returns
*/
export async function pathExists(filePath, fs) {
try {
await fs.stat(filePath);
return true;
}
catch (error) {
//@ts-expect-error - error is Error
if (error.code === "ENOENT") {
return false;
}
else {
throw new Error(`Failed to check if path exists: ${error}`, {
cause: error,
});
}
}
}
//# sourceMappingURL=exists.js.map