apis/fs/index.js
// Helper function that reads the file either sync or async
Helper function that reads the file either sync or async
Helper function that reads the file either sync or async
function _readFileFromFullPath(path, options, callback) {
  if (typeof options === 'function') {
    callback = options;
    options = {};
  }
  path = path_module.normalize(path);
  if (typeof callback === 'function') {
    fs.readFile(path, options, callback);
    return;
  } else {
    return fs.readFileSync(path, options);
  }
}
function _readFileFromFullPath ( path , options , callback ) { if ( typeof options === 'function' ) { callback = options ; options = { } ; } path = path_module . normalize ( path ) ; if ( typeof callback === 'function' ) { fs . readFile ( path , options , callback ) ; return ; } else { return fs . readFileSync ( path , options ) ; } }
Helper function that reads the file either sync or async
Helper function that reads the file either sync or async