Returns a list of the file tokens in the list of parts.
493864
def file_parts(self):
        
        file_parts = []
        for part in self.parts:
            try:
                for sub_part in part:
                    if isinstance(sub_part, FileToken):
                        file_parts.append(sub_part)
            except TypeError:
                if isinstance(part, FileToken):
                    file_parts.append(part)
        return file_parts
680148
@Override
    public List<String> getTokens() {
        //List<String> tokens = new ArrayList<>();
        if (!tokens.isEmpty())
            return tokens;

        log.info("Starting prebuffering...");
        while (streamHasMoreTokens()) {
            tokens.add(nextTokenFromStream());
        }
        log.info("Tokens prefetch finished. Tokens size: [" + tokens.size() + "]");
        return tokens;
    }
107563
def tokens(self):
        
        if self._tokens is None:
            self._tokens = TokenList(self._version, account_sid=self._solution['sid'], )
        return self._tokens
835946
def matching_files(self):
        
        matching = []
        matcher = self.file_path_regex
        pieces = self.file_path_regex.pattern.split(sep)
        partial_matchers = list(map(re.compile, (
            sep.join(pieces[:i + 1]) for i in range(len(pieces)))))

        for root, dirs, files in walk(self.top_dir, topdown=True):
            for i in reversed(range(len(dirs))):
                dirname = relpath(join(root, dirs[i]), self.top_dir)
                dirlevel = dirname.count(sep)
                if not partial_matchers[dirlevel].match(dirname):
                    del dirs[i]

            for filename in files:
                if matcher.match(filename):
                    matching.append(abspath(join(root, filename)))

        return matching
766661
def _GetFileNames(self):
    """"""
    if self._zip:
      return self._zip.namelist()
    else:
      return os.listdir(self._path)
1191155
def loadedFilenames( self ):
        
        output = []
        for i in range(self.uiContentsTREE.topLevelItemCount()):
            item = self.uiContentsTREE.topLevelItem(i)
            output.append(nativestring(item.filepath()))
        return output
14503
def get_parts(self):
        
        parts = []
        start_byte = 0
        for i in range(1, self.total + 1):
            end_byte = start_byte + self.part_size
            if end_byte >= self.file_size - 1:
                end_byte = self.file_size
            parts.append({
                'part': i,
                'offset': start_byte,
                'limit': end_byte
            })
            start_byte = end_byte
        return parts
237725
def internal_files(self):
        
        ret_list = []
        for key, val in self.file_dict.items():
            # For internal files we only want files that were marked as
            # internal
            if val & FileFlags.internal_mask:
                ret_list.append(key)
        return ret_list
46847
def _get_command_templates(command_tokens, files=[], paths=[], job_options=[],
    count=1):
    
    if not command_tokens:
        return []

    comment_tokens, command_token = command_tokens.pop()
    parts = []

    parts += job_options + _get_comments(comment_tokens)
    for part in command_token[0]:
        # Check for file
        try:
            parts.append(_get_file_by_alias(part, files))
            continue
        except (AttributeError, ValueError):
            pass

        # Check for path/string
        for cut in part.split():
            try:
                parts.append(_get_path_by_name(cut, paths))
                continue
            except ValueError:
                pass

            parts.append(cut)

    command_template = CommandTemplate(alias=str(count), parts=parts)
    [setattr(p, 'alias', command_template.alias)
        for p in command_template.output_parts]
    return [command_template] + _get_command_templates(command_tokens,
        files, paths, job_options, count+1)
303409
def _get_filepaths(self):
        """"""
        self._printer(str(self.__len__()) + " file paths have been parsed in " + str(self.timer.end))
        if self._hash_files:
            return pool_hash(self.filepaths)
        else:
            return self.filepaths
1131380
def get_files(self):
        
        return github.PaginatedList.PaginatedList(
            github.File.File,
            self._requester,
            self.url + "/files",
            None
        )
288066
def get_file_list(wildcard):
    
    files = glob.glob(os.path.expanduser(wildcard))
    return files
1172500
public static function getTokens(string $filename): array
    {
        $tokens = token_get_all(file_get_contents($filename));

        $line = 0;
        foreach ($tokens as &$token) {
            if (isset($token[self::LINE])) {
                $line = $token[self::LINE];
            }

            if (!is_array($token)) {
                $token = [$token, $token, $line];
            }

            unset($token);
        }

        return $tokens;
    }
454484
def get_tokens_list(self, registry_address: PaymentNetworkID):
        """"""
        tokens_list = views.get_token_identifiers(
            chain_state=views.state_from_raiden(self.raiden),
            payment_network_id=registry_address,
        )
        return tokens_list
1280924
def list_files(path, extension=".cpp", exclude="S.cpp"):
    """"""
    return ["%s/%s" % (path, f) for f in listdir(path) if f.endswith(extension) and (not f.endswith(exclude))]
1029949
def get_file_list():
    """"""

    if len(sys.argv) > 1:
        file_list = list(sys.argv[1:])  # make copy
    else:
        files_str = input('Select the files you want to process and drag and drop them onto this window, '
                          'or type their names separated by spaces. Paths containing spaces should be '
                          'surrounded by quotation marks.\nPress ENTER when you\'re done: ')

        if "win" in sys.platform:
            # the POSIX shlex.split uses backslashes for escape sequences, so Windows paths need to set posix=False
            file_list = shlex.split(files_str, posix=False)

            # the non-POSIX shlex.split does not automatically clean quotation marks from the final product
            file_list = [f.replace('"', '').replace("'", "") for f in file_list]
        else:
            file_list = shlex.split(files_str, posix=True)

    # substitute in shell variables and get absolute paths
    for i in range(len(file_list)):
        file_list[i] = os.path.abspath( os.path.expanduser(os.path.expandvars(file_list[i])) )

    return file_list
624995
def normalize(self, parts):
        

        part = parts.list[0]

        return {
            'content': part.file.read(),
            'content-type': part.type,
            'file-ext': extensions.get(part.type),
            'file-name': part.filename,
        }