How to use the realpath function from graceful-fs

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

100
101
102
103
104
105
106
107
108
109
      resolve({ bytesWritten, buffer })
    })
  })
}


// fs.realpath.native only available in Node v9.2+
if (typeof fs.realpath.native === 'function') {
  exports.realpath.native = u(fs.realpath.native)
}
fork icon0
star icon1
watch icon0

126
127
128
129
130
131
132
133
134
135
      resolve({ bytesWritten, buffers })
    })
  })
}

// fs.realpath.native sometimes not available if fs is monkey-patched
if (typeof fs.realpath.native === 'function') {
  exports.realpath.native = u(fs.realpath.native)
} else {
  process.emitWarning(
fork icon808
star icon0
watch icon93

+ 27 other calls in file

268
269
270
271
272
273
274
275
276
277
  handleFatalError(err);
  return stream;
}

// If filters were valid get on with the show
fs.realpath(opts.root, function(err, res) {
  if (err) {
    handleFatalError(err);
    return stream;
  }
fork icon0
star icon0
watch icon1

+ 21 other calls in file

67
68
69
70
71
72
73
74
75
76

  activeFiles[absoluteName].push(resolve) // add this job to the queue
  if (activeFiles[absoluteName].length === 1) resolve() // kick off the first one
}).then(function getRealPath () {
  return new Promise(function (resolve) {
    fs.realpath(filename, function (_, realname) {
      truename = realname || filename
      tmpfile = getTmpname(truename)
      resolve()
    })
fork icon0
star icon0
watch icon0

+ 3 other calls in file