mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 15:36:16 -04:00
16 lines
256 B
TypeScript
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
|