aboutsummaryrefslogtreecommitdiff
path: root/node_modules/fs-exists-sync/index.js
blob: b7f00c7deef70ef539430b21e4472156c9fb6c85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*!
 * 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;
};