Adds a list of file locations to the current list

        Args:
            file_locations: list of file location tuples
559760
def add_file_locations(self, file_locations=[]):
        
        if not hasattr(self, '__file_locations__'):
            self.__file_locations__ = copy.copy(file_locations)
        else:
            self.__file_locations__ += copy.copy(file_locations)
174636
def add_uploads(self, filemap):
        
        [self.add_upload(k, v) for k, v in filemap.iteritems()]
447120
private void populateFileList(ResourceFileList list, File root, boolean recurse) 
	throws IOException {
		if(root.isDirectory()) {
			File[] files = root.listFiles();
			if(files != null) {
				for(File file : files) {
					if(file.isFile() && filter.accept(root, file.getName())) {
						ResourceFileLocation location = new ResourceFileLocation(
								file.getName(),file.getAbsolutePath());
						list.add(location);
					} else if(recurse && file.isDirectory()){
						populateFileList(list, file, recurse);
					}
				}
			}
		} else {
			LOGGER.warning(root.getAbsolutePath() +	" is not a directory.");
			return;
		}
	}
910012
def for_each_file(base_dir, func):
    

    for dir_path, _, file_names in os.walk(base_dir):
        for filename in file_names:
            func(os.path.join(dir_path, filename))
22456
public static function add($file_path, array $file_manipulations)
    {
        self::$file_manipulations[$file_path] = isset(self::$file_manipulations[$file_path])
            ? array_merge(self::$file_manipulations[$file_path], $file_manipulations)
            : $file_manipulations;
    }
1104419
private void addCurrentDirFiles(List<File> theFiles, List<File> theDirs, File currentDir) {
    File dirs[] = currentDir.listFiles(new FileFilter() {

      @Override
      public boolean accept(File file) {
        return file.isDirectory() && !file.getName().startsWith(".") && !file.getName().equals("META-INF");
      }
      
    });
    
    File htmlFiles[] = currentDir.listFiles(new FileFilter() {

      @Override
      public boolean accept(File file) {
        return !file.isDirectory() && file.isFile() && file.canRead() && !file.getName().startsWith(".") && (file.getName().endsWith(".html") || file.getName().endsWith(".htm"));
      }
      
    });
    
    if(dirs != null && dirs.length > 0) {
      theDirs.addAll(Arrays.asList(dirs));
    }
    if(htmlFiles != null && htmlFiles.length > 0) {
      theFiles.addAll(Arrays.asList(htmlFiles));
    }
  }
1127935
def list_locations(self):
        
        known = self.defaults.get_known_locations()
        for default in self.defaults.distdefault:
            if default not in known:
                known.add(default)
        if not known:
            err_exit('No locations', 0)
        for location in sorted(known):
            if location in self.defaults.distdefault:
                print(location, '(default)')
            else:
                print(location)
        sys.exit(0)
745895
def _sort_locations(locations):
        
        files = []
        urls = []

        # puts the url for the given file path into the appropriate
        # list
        def sort_path(path):
            url = path_to_url2(path)
            if mimetypes.guess_type(url, strict=False)[0] == 'text/html':
                urls.append(url)
            else:
                files.append(url)

        for url in locations:
            if url.startswith('file:'):
                path = url_to_path(url)
                if os.path.isdir(path):
                    path = os.path.realpath(path)
                    for item in os.listdir(path):
                        sort_path(os.path.join(path, item))
                elif os.path.isfile(path):
                    sort_path(path)
            else:
                urls.append(url)
        return files, urls
399277
def _add_extra_files(self, files):
        ''''''

        try:
            for f in files:
                self.logger.con_out("adding additional file for analysis: %s"  % f)
                fname = os.path.basename(f)
                f_new = os.path.join(self.dir_path, fname)
                shutil.copyfile(f,f_new)
        except IOError as e:
            self.logger.con_out("ExtraFileError: %s is not readable or does not exist. Skipping File" % f)
            self.logger.exception(e)
            pass
        except Exception as e:    # pragma: no cover
            self.logger.exception(e)
            raise Exception("ExtraFileError: Unable to Process Extra File - %s" % f)
1316798
def files(self, *args, **kwargs):
        

        return [p for p in self.listdir(*args, **kwargs) if p.isfile()]
1298403
private List<File> listFiles(File file, List<File> files) {
        File[] children = file.listFiles();
        
        if (children != null) {
            for (File child : children) {
                files.add(child);
                listFiles(child, files);
            }
        }
        
        return files;
    }
1162177
def _file_list(info_list) # :nodoc:
      files = Array.new
      info_list.each {|r|
        #p r.inspect
        # file is not modified, we don't want to see it (this is 'status')
        txt_stat = r[1].text_status
        next if ' ' == status_codes(txt_stat)
        f_rec = Hash.new
        f_rec[:path] = r[0]
        f_rec[:status] = status_codes(txt_stat)
        files.push f_rec
      }
      files
    end
335733
def file_to_list(file_name, file_location):
    
    file = __os.path.join(file_location, file_name)
    read_file = open(file, "r")
    temp_list = read_file.read().splitlines()
    read_file.close()
    return temp_list
1096984
public void addLines(Collection<TaintLocation> locations) {
        Objects.requireNonNull(detector, "locations");
        for (TaintLocation location : locations) {
            lines.add(SourceLineAnnotation.fromVisitedInstruction(
                location.getMethodDescriptor(), location.getPosition()));
        }
    }
697004
def add_files filearray, config={}
      filearray.each do |e| add_content(e, config.dup); end
    end
736859
def include_all_subfiles(*args):
    
    file_list = []
    for path_included in args:
        local_path = path.join(HERE, path_included)

        for file in listdir(local_path):
            file_abspath = path.join(local_path, file)
            if path.isdir(file_abspath):    #do not include sub folders
                continue
            file_list.append(path_included + '/' + file)

    return file_list
519956
def add_directory(self, directory: PathLike) -> None:
        
        directory = os.path.abspath(directory)
        if not os.path.isdir(directory):
            raise IOError("not a directory: {!r}".format(directory))

        for tbfile in fnmatch.filter(os.listdir(directory), "*.gtb.cp4"):
            self.available_tables[os.path.basename(tbfile).replace(".gtb.cp4", "")] = os.path.join(directory, tbfile)