b7f00c7deef70ef539430b21e4472156c9fb6c85
[yaffs-website] / index.js
1 /*!
2  * fs-exists-sync (https://github.com/jonschlinkert/fs-exists-sync)
3  *
4  * Copyright (c) 2016, Jon Schlinkert.
5  * Licensed under the MIT License.
6  */
7
8 'use strict';
9
10 var fs = require('fs');
11
12 module.exports = function(filepath) {
13   try {
14     (fs.accessSync || fs.statSync)(filepath);
15     return true;
16   } catch (err) {}
17   return false;
18 };