How to use the realpathSync function from graceful-fs

Find comprehensive JavaScript graceful-fs.realpathSync code examples handpicked from public code repositorys.

507
508
509
510
511
512
513
514
515
516
517
518
exports.readlink = Promise.promisify(fs.readlink);
exports.readlinkSync = fs.readlinkSync;


// realpath
exports.realpath = Promise.promisify(fs.realpath);
exports.realpathSync = fs.realpathSync;


// rename
exports.rename = Promise.promisify(fs.rename);
exports.renameSync = fs.renameSync;
fork icon9
star icon48
watch icon0

+ 7 other calls in file

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16


const logMessages = require('./log-messages');


exports.cachePrefix = cachePrefix;


const NS = fs.realpathSync(path.dirname(__dirname));


const cachePrefixNS = `${NS}/cachePrefix`;


function cachePrefix(compilation) {
fork icon0
star icon0
watch icon1

+ 30 other calls in file

178
179
180
181
182
183
184
185
186
187
188


function writeFileSync (filename, data, options) {
  if (typeof options === 'string') options = { encoding: options }
  else if (!options) options = {}
  try {
    filename = fs.realpathSync(filename)
  } catch (ex) {
    // it's ok, it'll happen on a not yet existing file
  }
  var tmpfile = getTmpname(filename)
fork icon0
star icon0
watch icon0

+ 3 other calls in file