Add multiple files to the list of files to be compiled.
@param {...string} varArgs
@return {GccRest}
346418
function(varArgs) {
        for (var i = 0, m = arguments.length; i < m; i++) {
            this.addFile(arguments[i]);
        }
        return this;
    }
1171182
function writeFile (outDir, vars, file) {
  return function (done) {
    const fileName = file.path
    const inFile = file.fullPath
    const parentDir = file.parentDir
    const outFile = path.join(outDir, maxstache(removeUnderscore(fileName), vars))

    mkdirp(path.join(outDir, maxstache(parentDir, vars)), function (err) {
      if (err) return done(err)

      const rs = fs.createReadStream(inFile)
      const ts = maxstacheStream(vars)
      const ws = fs.createWriteStream(outFile)

      pump(rs, ts, ws, done)
    })
  }
}
878081
protected void addModuleArg(String jsFile, String moduleName, List<String> args, StringBuilder moduleArg) {
		int argIdx = 0;
		for (Iterator<String> iterArg = args.iterator(); iterArg.hasNext(); argIdx++) {
			String arg = iterArg.next();
			if (arg.equals(JS_ARG)) {
				iterArg.next();
				arg = iterArg.next();
				argIdx += 2;
			}
			if (arg.equals(MODULE_ARG)) {
				arg = iterArg.next();
				argIdx++;
				Matcher matcher = MODULE_ARG_PATTERN.matcher(arg);
				if (matcher.find()) {
					String dep = matcher.group(1);
					if (dep != null) {
						List<String> moduleDependencies = Arrays.asList(dep.split(MODULE_DEPENDENCIES_SEPARATOR));
						if (moduleDependencies.contains(moduleName)) {
							break;
						}
					}
				} else {
					throw new BundlingProcessException(
							"There were an error in the generation of the module dependencies.");
				}
			}
		}

		args.add(argIdx++, JS_ARG);
		args.add(argIdx++, jsFile);
		args.add(argIdx++, MODULE_ARG);
		args.add(argIdx++, moduleArg.toString());
	}
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);
		});
	});
}
787217
function (dir, filelist, ext, currentBundleOptions) {
    var path = path || require('path');
    var fs = fs || require('fs');
    var files = fs.readdirSync(dir);
    filelist = filelist || [];
    files.forEach(function (file) {
        if (fs.statSync(path.join(dir, file)).isDirectory()) {
            filelist = walkSync(path.join(dir, file), filelist, ext, currentBundleOptions);
        }
        else {
            if (file.match(new RegExp("." + ext + "$")) && !isExcluded(file, currentBundleOptions))
                filelist.push(path.join(dir, file));
        }
    });
    return filelist;
}
861760
function( files, options, callback ) {
	if ( !Array.isArray( files ) ) {
		files = [files];
	}
	if ( typeof options === 'function' ) {
		callback = options;
		options = null;
	} else if ( typeof options === 'string' ) {
		options = { msg: options };
	}
	options = options || {};
	addExtraOptions( [ 'quiet', 'depth', 'msg' ], options );
	executeSvn( [ 'commit' ].concat( files ), options, callback );
}
187652
function addAddedFileInnScript(key, path, dot_path){
			dot_path = dot_path || path;
			// checking if same file imported twice for same Class.
			if(!dot_path) return;
			var script = scriptArr[scriptArr.length - 1];
			if( !script ){
				return;
			}
			var arr = script[key] ||  (script[key] = []);
			if( arr.indexOf(dot_path) === -1 ) {
				arr.push(dot_path);
			}
			return true;
		}
1148868
async function add(files) {
	const shell = await execa('git', ['add', '--ignore-errors'].concat(files), {reject: false});
	debug('add file to git index', shell);
}
1010682
protected void addJsFiles(JavaScriptObject files) {

        JsArray<CmsFileInfo> cmsFiles = files.cast();
        List<CmsFileInfo> fileObjects = new ArrayList<CmsFileInfo>();
        for (int i = 0; i < cmsFiles.length(); ++i) {
            fileObjects.add(cmsFiles.get(i));
        }
        addFiles(fileObjects);
    }
704949
private static String[] addSrcBeforeDirectories(String[] args) {
        List<String> newargs = new ArrayList<String>();
        for (int i = 0; i<args.length; ++i) {
            File dir = new File(args[i]);
            if (dir.exists() && dir.isDirectory()) {
                if (i == 0 || !shouldBeFollowedByPath(args[i-1])) {
                    newargs.add("-src");
                }
            }
            newargs.add(args[i]);
        }
        return newargs.toArray(new String[0]);
    }
617551
def fix_input_files_for_variadic_seq(headerDir, sourceDir, timestamp):
    """"""
    # Fix files in include/source-directories.
    files  = glob.glob( os.path.join( headerDir, "*.hpp" ) )
    files += glob.glob( os.path.join( headerDir, "aux_", "*.hpp" ) )
    files += glob.glob( os.path.join( sourceDir, "src", "*" ) )
    for currentFile in sorted( files ):
        fix_header_comment( currentFile, timestamp )
651533
function ExpandFiles(options) {
  if (!(this instanceof ExpandFiles)) {
    return new ExpandFiles(options);
  }

  Base.call(this, {}, options);
  this.use(utils.plugins());
  this.is('Files');

  this.options = options || {};
  if (util.isFiles(options) || arguments.length > 1) {
    this.options = {};
    this.expand.apply(this, arguments);
    return this;
  }
}
1330537
function(paths) {

        var appends = [];

        if (grunt.option("quiet") || config.quiet) {
            appends.push("--quiet");
        }

        if (grunt.option("verbose") || config.verbose) {
            appends.push("--verbose");
        }

        if (grunt.option("rules") || config.rules) {
            var rules = _.isString(config.rules) ? config.rules.split(",") : config.rules;
            appends.push("--rules=" + rules.join(","));
        }

        if (grunt.option("dryRun") || config.dryRun) {
            appends.push("--dry-run");
        }

        if (grunt.option("diff") || config.diff) {
            appends.push("--diff");
        }

        if (grunt.option("allowRisky") || config.allowRisky) {
            appends.push("--allow-risky yes");
        }

        if (grunt.option("usingCache") || config.usingCache) {
            appends.push("--using-cache " + config.usingCache);
        }

        if (grunt.option("configfile") || config.configfile) {
            appends.push("--config=" + config.configfile);
        }

        var bin = path.normalize(config.bin),
            append = appends.join(" "),
            cmds = [];

        if (paths.length) {
            cmds = _.map(paths, function(thePath) {
                return bin + " fix " + thePath + " " + append;
            });
        }

        if (grunt.option("configfile") || config.configfile) {
            cmds.push(bin + " fix " + append);
        }

        return cmds;
    }
623724
function addFileResource(cmd, file, params, callback) {
    if( !file ) return callback({error:true,message:"no file provided"});
    if( !fs.existsSync(file) ) return callback({error:true,message:"no file found: "+file});
    if( !fs.statSync(file).isFile() ) return callback({error:true,message:"not a file: "+file});
    if( !params ) return callback({error:true,message:"no resource parameters provided"});
    if( !params.package_id ) return callback({error:true,message:"no package_id provided"});

    // clean up filename
    var name = getCkanFilename(file);
    var folder = new Date().toISOString()+'/'+name;
    
    // set default / known parameters
    params.url = server+"/storage/f/"+encodeURIComponent(folder);
    if( !params.name ) params.name = file.replace(/.*\//,'');
    params.size = fs.statSync(file).size;
    params.resource_type = "file.upload";
    
    exports.exec(cmd, params, function(err, pkg){
        if( err ) return callback(err);
        
        rest.post(server + '/storage/upload_handle', {
            multipart: true,
            headers : {
                Authorization : key
            },
            data: {
              key: folder,
              file: rest.file(file, null, fs.statSync(file).size, null, params.mimetype)
            }
        }).on('complete', function(data) {
            // HACK: redirects seem to fire complete twice.  this is bad
            if( !callback ) return;
            
            if (data instanceof Error) {
                callback(data);
            } else {
                callback(null, data);
            }
            callback = null;
        });
    });

}
1019534
function ( obj, arg ) {
		array.each( arg, function ( i ) {
			array.add( obj, i );
		});

		return obj;
	}
562976
function bundleEmbedJS(options) {
    const srcmap = require('./srcmap');
    const BUILT_PATH = path.join(__dirname, '..', config.dir.built);

    // commpact entry file
    const wrap = fs.readFileSync(
        path.join(BUILT_PATH, config.main.basename + '-entry.js')
    ).toString()
        .replace(/^\ufeff/gm, '')
        .replace(/\r\n/gm, '\n')
        .replace(/\/\/<<[\s\S]*?\/\/>>/, '__LIRBRARY_CODE__')
        .replace(/\/\*[\s\S]*?\*\//gm, '')
        .replace(/\/\/[\s\S]*?\n/gm, '')
        .replace(/ {4}/gm, '')
        .replace(/\n/gm, ' ')
        .replace('__LIRBRARY_CODE__', '\n' + '__LIRBRARY_CODE__' + '\n')
        .replace(/^ /gm, '')
        .replace(/ $/gm, '')
        .split('\n');

    const imple = fs.readFileSync(
        path.join(BUILT_PATH, config.main.basename + '-all.js')
    ).toString()
        .replace(/^\ufeff/gm, '')
        .replace(/\r\n/gm, '\n')
    ;

    const node = srcmap.getNodeFromCode(imple);

    node.prepend(wrap[0] + '\n');
    if (options.banner) {
        node.prepend(banner('.js', config.main.basename));
    }
    node.add('\n' + wrap[2] + '\n');

    const bundleSrc = '\ufeff' + srcmap.getCodeFromNode(node, (srcPath) => {
        const regex_src = new RegExp(`${config.dir.src}\\/${config.dir.script}\\/`);
        return srcPath
            .replace(/\.\.\//g, '')
            .replace(regex_src, SOURCE_MAP_NAMESPACE)
        ;
    });
    fs.writeFileSync(path.join(BUILT_PATH, config.main.basename + '.js'), bundleSrc);
    fs.writeFileSync(path.join(DST_PATH, config.main.basename + '.js'), bundleSrc);
}
1116664
private static String js_concat(String target, Object[] args) {
        int N = args.length;
        if (N == 0) { return target; }
        else if (N == 1) {
            String arg = ScriptRuntime.toString(args[0]);
            return target.concat(arg);
        }

        // Find total capacity for the final string to avoid unnecessary
        // re-allocations in StringBuilder
        int size = target.length();
        String[] argsAsStrings = new String[N];
        for (int i = 0; i != N; ++i) {
            String s = ScriptRuntime.toString(args[i]);
            argsAsStrings[i] = s;
            size += s.length();
        }

        StringBuilder result = new StringBuilder(size);
        result.append(target);
        for (int i = 0; i != N; ++i) {
            result.append(argsAsStrings[i]);
        }
        return result.toString();
    }