9 lines
214 B
TypeScript
9 lines
214 B
TypeScript
import fs from 'fs/promises';
|
|
|
|
// lstat is used because this is also used to check if a symlink file exists
|
|
export const fileExists = (filePath: string) =>
|
|
fs.lstat(filePath).then(
|
|
() => true,
|
|
() => false
|
|
);
|