Files
aicommits/src/utils/fs.ts
Hassan El Mghari f33bfeed60 formatting
2024-01-26 09:53:16 -08:00

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
);