etherpad-lite/src/node/utils/path_exists.ts
2024-07-22 14:53:37 +02:00

16 lines
256 B
TypeScript

'use strict';
import fs from 'fs';
const check = (path:string) => {
const existsSync = fs.statSync || fs.existsSync;
let result;
try {
result = existsSync(path);
} catch (e) {
result = false;
}
return result;
};
export default check