How to use the statAsync function from fs-extra

Find comprehensive JavaScript fs-extra.statAsync code examples handpicked from public code repositorys.

79
80
81
82
83
84
85
86
87
88
return Promise.map(pluginDirs, function(pluginName)
{
    var pluginDir = path.join('/opt/openrov/cockpit/src/plugins', pluginName);

    // Check for a firmware folder
    return fs.statAsync(path.join(pluginDir, 'firmware'))
        .then(function()
        {
            // Copy all files to the sketch directory
            return fs.copyAsync(path.join(pluginDir, 'firmware'), stagedSketchDir);
fork icon94
star icon63
watch icon33

293
294
295
296
297
298
299
300
301
302
    return false;
  }
},
async isDir(path) {
  try {
    return (await fs.statAsync(path)).isDirectory();
  } catch (e) {
    return false;
  }
},
fork icon0
star icon0
watch icon1

+ 43 other calls in file

function icon

fs-extra.readFileSync is the most popular function in fs-extra (9724 examples)