Portfolio/node_modules/fs-exists-sync/index.js
oitsjustjose 4e066bffc9 Init
2017-02-25 03:50:31 -05:00

18 lines
341 B
JavaScript

/*!
* fs-exists-sync (https://github.com/jonschlinkert/fs-exists-sync)
*
* Copyright (c) 2016, Jon Schlinkert.
* Licensed under the MIT License.
*/
'use strict';
var fs = require('fs');
module.exports = function(filepath) {
try {
(fs.accessSync || fs.statSync)(filepath);
return true;
} catch (err) {}
return false;
};