Get prepend/append wrapper (array of file content)
490942
function optionWrapper(options, option){
        var files = optionResult(options, option);
        // Map all files to their content
        return _.map(grunt.file.expand(files), function(file){
            return grunt.file.read(file);
        });
    }
1363908
function getEntitlements(file) {
    let content;

    try {
      content = fs.readFileSync(file, "utf8");
    } catch (err) {
      return {};
    }

    return plist.parse(content);
  }
1357885
def file_prepender(filename):
    
    with open_file(filename, 'r+') as f:
        content = f.read()
        f.seek(0, 0)
        f.write(molecule_prepender(content))
290906
def write_array(path, arr):
    """"""
    file_ext = op.splitext(path)[1]
    if file_ext == '.npy':
        return np.save(path, arr)
    raise NotImplementedError("The file extension `{}` ".format(file_ext) +
                              "is not currently supported.")
878806
def _prepack(self):
        '''
        
        '''
        current = self
        while current is not None:
            current._parser.prepack(current, skip_self = True)
            current = getattr(current, '_sub', None)
        current = self
        while current is not None:
            current._parser.prepack(current, skip_sub = True)
            current = getattr(current, '_sub', None)
475731
function getAppend(path, obj, target, propName){
  var propValue = utils.getNodeVaue(path, obj);
  if(propValue)
    target[propName] = propValue;
}
1068828
def format_file_params(files):
        '''
            
        '''
        files_payload = {}
        if files:
            for idx, filename in enumerate(files):
                files_payload["file[" + str(idx) + "]"] = open(filename, 'rb')
        return files_payload
542980
function preprocessorcery(infile, info, callback) {
  applicable(infile, info, (err, preprocessors) => {
    if (err) return callback(err);

    const q = queue(1);
    preprocessors.forEach((preprocessor) => {
      const outfile = newfile(infile);
      q.defer((next) => {
        preprocessor(infile, outfile, (err) => {
          if (err) return next(err);
          infile = outfile;
          next();
        });
      });
    });

    q.await((err) => {
      if (err) return callback(err);

      // infile has been changed to the output file by this point
      callback(null, infile);
    });
  });
}
367743
function getDepList(file, added) {
        var depList = [];
        added = added || {};
        file.requires.forEach(function (depId) {
            if (added[depId]) {
                return false;
            }
            added[depId] = true;
            var dep = ret.ids[depId];
            if (!dep) {
                var isNotice = true;
                if (settings.notice && settings.notice.exclude) {
                    isNotice = fis.util.filter(file.subpath, null, settings.notice.exclude);
                }
                if (isNotice) {
                    fis.log.notice('can\'t find dep resource [' + depId + ']');
                }
                return false;
            }
            depList = depList.concat(getDepList(dep, added));
            depList.push(dep);
        });
        return depList;
    }
1288801
def arrays_to_file(file_prefix=None):
    """"""
    return Registry(
        types={
            numpy.ndarray: SerNumpyArrayToFile(file_prefix)
        },
        hooks={
            '<ufunc>': SerUFunc()
        },
        hook_fn=_numpy_hook
    )
359055
function concat(options, callback) {
  var files = options.files.map(function(file, i) {
    return {
      path: node_path.join(lib, file + '.js'),
      index: i
    }
  });

  var contents = [];
  async.each(files, function(task, done) {
    fs.readFile(task.path, function(err, content) {
      if (err) {
        return done(err);
      }

      contents[task.index] = content.toString();
      done(null);
    });

  }, function(err) {
    if (err) {
      return callback(err);
    }

    var intro = options.intro ? options.intro + '\n\n\n' : '';
    var outro = options.outro ? '\n\n\n' + options.outro : '';
    var content = intro + contents.join('\n\n') + outro;
    content = content.replace(/@VERSION/g, concat.version());
    callback(null, content);
  });
}
872010
function concatFiles() {
	return Promise.all(argv._.map(handleGlob)).then(globs => {
		const files = globs.reduce((acc, cur) => acc.concat(cur), []);

		if (
			(files.length < 2 && typeof argv.banner === 'undefined' && !argv.footer) ||
			(files.length === 0 && (typeof argv.banner === 'undefined' || !argv.footer))
		) {
			throw new Error(
				chalk.bold.red('Require at least 2 file, banner or footer to concatenate. ("ncat --help" for help)\n')
			);
		}
		return files.forEach(file => {
			concat.add(file.file, file.content, file.map);
		});
	});
}
746456
function getIncludes(file) {
    var content = String(file.contents);
    var matches = [];

    while (regexMatch = DIRECTIVE_REGEX.exec(content)) {
      matches.push(regexMatch);
    }

    // For every require fetch it's matching files
    var fileLists = _.map(matches, function(match) {
      return globMatch(match, file).sort();
    });

    // Merge all matching file lists into one concat list
    var order = _.reduce(fileLists, function(memo, fileList) {
      return _.union(memo, fileList);
    }, []);

    // And self to include list
    order.push(file.relative);
    return order;
  }
24820
function loadFiles(items, event) {
      if(!items.length){
        return; // nothing to do
      }
      $.fire('beforeAdd');
      var files = [];
      processCallbacks(
          Array.prototype.map.call(items, function(item){
            // bind all properties except for callback
            var entry = item;
            if('function' === typeof item.webkitGetAsEntry){
              entry = item.webkitGetAsEntry();
            }
            return processItem.bind(null, entry, "", files);
          }),
          function(){
            if(files.length){
              // at least one file found
              appendFilesFromFileList(files, event);
            }
          }
      );
    }
675515
function contentsAsync(file, options, cb) {
  if (typeof options === 'function') {
    cb = options;
    options = {};
  }

  if (typeof cb !== 'function') {
    throw new TypeError('expected a callback function');
  }

  if (!utils.isObject(file)) {
    cb(new TypeError('expected file to be an object'));
    return;
  }

  contentsSync(file, options);
  cb(null, file);
}
532278
function appendFilename(pathStr, valueToAppend) {
  var pfile = path.parse(pathStr);
  var result = Array.prototype.join.call([
    pfile.dir,
    '/',
    pfile.name,
    valueToAppend,
    pfile.ext
  ], '');
  return result;
}
165152
def append(data)
      unless data.kind_of? Array
        raise ArgumentError, 'Xcellus.append only accepts Arrays'
      end
      Xcellus::_append(@handle, data.to_json)
    end