import * as fs from 'fs' ; param { string } path returns export function fileExists ( path ) { return fs . existsSync ( path ) ; } ; param { string } path returns export function folderExists ( path ) { try { return fs . lstatSync ( path ) . isDirectory ( ) ; } catch ( e ) { return false ; } } ;