Returns the filenames of all files attached to posts in the thread.
430061
def filenames(self):
        """"""
        if self.topic.has_file:
            yield self.topic.file.filename
        for reply in self.replies:
            if reply.has_file:
                yield reply.file.filename
478860
public function getData() {
        $values = array_filter(filter_input_array(INPUT_POST));
        foreach ($values as $key => $value) {
            if ( is_array($value) )  {
                $values[$key] = array_filter($value);
            }
        }

        return $values + $_FILES;
    }
637015
def posts_template_data(post_items)
      if post_items.nil?
        return []
      end

      template_data = post_items.map do |post|
        {
          :title    => post.data['title'],
          :filename => post.name,
          :date     => post.date
        }
      end

      template_data.sort! { |x,y| y[:date] <=> x[:date] }

      template_data
    end
1255798
public function getFileNames()
    {

        $filesArray = $this->getFiles();
        $filenamesArray = array();

        foreach ($filesArray as $file) {
            $sFileName = $file->getName();
            array_push($filenamesArray, $sFileName);
        }
        sort($filenamesArray);
        return $filenamesArray;
    }
167244
def prepare_post_parameters(self, post_params=None, files=None):
        
        params = []

        if post_params:
            params = post_params

        if files:
            for k, v in six.iteritems(files):
                if not v:
                    continue
                file_names = v if type(v) is list else [v]
                for n in file_names:
                    with open(n, 'rb') as f:
                        filename = os.path.basename(f.name)
                        filedata = f.read()
                        mimetype = (mimetypes.guess_type(filename)[0] or
                                    'application/octet-stream')
                        params.append(
                            tuple([k, tuple([filename, filedata, mimetype])]))

        return params
1263229
def get_recent_files(self):
        
        ret_val = []
        files = self.get_value('list', [])
        # filter files, remove files that do not exist anymore
        for file in files:
            if file is not None and os.path.exists(file):
                if os.path.ismount(file) and \
                        sys.platform == 'win32' and not file.endswith('\\'):
                    file += '\\'
                if file not in ret_val:
                    ret_val.append(file)
        return ret_val
797738
@InterfaceAudience.Public
    public List<String> getAttachmentNames() {
        Map<String, Object> attachmentMetadata = getAttachmentMetadata();
        if (attachmentMetadata == null) {
            return new ArrayList<String>();
        }
        return new ArrayList<String>(attachmentMetadata.keySet());
    }
519639
def _get_file_lists(self):
        """"""
        self.cam0_files = sorted(glob.glob(
            os.path.join(self.sequence_path, 'image_0',
                         '*.{}'.format(self.imtype))))
        self.cam1_files = sorted(glob.glob(
            os.path.join(self.sequence_path, 'image_1',
                         '*.{}'.format(self.imtype))))
        self.cam2_files = sorted(glob.glob(
            os.path.join(self.sequence_path, 'image_2',
                         '*.{}'.format(self.imtype))))
        self.cam3_files = sorted(glob.glob(
            os.path.join(self.sequence_path, 'image_3',
                         '*.{}'.format(self.imtype))))
        self.velo_files = sorted(glob.glob(
            os.path.join(self.sequence_path, 'velodyne',
                         '*.bin')))

        # Subselect the chosen range of frames, if any
        if self.frames is not None:
            self.cam0_files = utils.subselect_files(
                self.cam0_files, self.frames)
            self.cam1_files = utils.subselect_files(
                self.cam1_files, self.frames)
            self.cam2_files = utils.subselect_files(
                self.cam2_files, self.frames)
            self.cam3_files = utils.subselect_files(
                self.cam3_files, self.frames)
            self.velo_files = utils.subselect_files(
                self.velo_files, self.frames)
118885
def listing(self):
        ""
        return ['.'.join([f,ext]) if ext else f for (f,ext) in self._files.keys()]
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
79127
private void doFindFiles() throws IOException {
    Set<FileSystem> allFs = new HashSet<FileSystem>();
    Set<Path> filesToFix = new HashSet<Path>();      // files that are yet to be fixed

    // collect all unique filesystems in all policies.
    for (PolicyInfo pinfo: all) {
      FileSystem fs = getFs(pinfo.getConf(), pinfo.getSrcPath());
      if (fs != null) {
        allFs.add(fs);
      }
      for (PathInfo d:pinfo.getDestPaths()) {
        fs = getFs(pinfo.getConf(), d.rpath);
        if (fs != null) {
          allFs.add(fs);
        }
      }
    }

    // make a RPC to all relevant namenodes to find corrupt files
    for (FileSystem fs:allFs) {
      if (!running) break;
      List<Path> corruptFiles = null;

      corruptFiles = getCorruptFilesFromNamenode(fs);

      // if we are not already fixing this one, then put it in the list
      // of files that need fixing.
      for (Path p : corruptFiles) {
        if (filesBeingFixed.add(p)) {
           filesToFix.add(p);
        }
      }
    }

    if (!filesToFix.isEmpty()) {
      LOG.info("Found " + filesToFix.size() + " corrupt files.");
    }

    for (Path path: filesToFix) {
      if (!running) break;
      try {
        fixFile(path);
      } catch (IOException ie) {
        LOG.error("Error while processing " + path +
          ": " + StringUtils.stringifyException(ie));
        // For certain kinds of errors, it might be good if we remove
        // this file from filesBeingFixed, so that the file-fix gets
        // attemted in the immediate next iteration. For example, if
        // we get a network Exception, we can retry immediately. On 
        // the other hand, if we get a file length mismatch exception
        // then no amount of retry will fix it, so it is better to 
        // retry less frequently.
      }
    }
  }
143668
def GetAllFiles(self):
    
    for filepath in self._files:
      yield filepath

    for dirpath in self._dirs:
      for filepath in ArtifactRegistrySources._GetDirYamlFiles(dirpath):
        if filepath in self._files:
          continue
        yield filepath
1204848
def get_posts(self, include_draft=False, filter_functions=None):
        

        def posts_generator(path):
            """Loads valid posts one by one in the given path."""
            if os.path.isdir(path):
                for file in os.listdir(path):
                    filename, ext = os.path.splitext(file)
                    format_name = get_standard_format_name(ext[1:])
                    if format_name is not None and re.match(
                            r'\d{4}-\d{2}-\d{2}-.+', filename):
                        # the format is supported and the filename is valid,
                        # so load this post
                        post = Post()
                        post.format = format_name
                        post.meta, post.raw_content = FileStorage.read_file(
                            os.path.join(path, file))
                        post.rel_url = filename.replace('-', '/', 3) + '/'
                        post.unique_key = '/post/' + post.rel_url
                        yield post

        posts_path = os.path.join(current_app.instance_path, 'posts')
        result = filter(lambda p: include_draft or not p.is_draft,
                        posts_generator(posts_path))
        result = self._filter_result(result, filter_functions)

        return sorted(result, key=lambda p: p.created, reverse=True)
1194320
protected function fileName() {

		$filename = basename( get_attached_file( $this->post->ID ) );

		if ( $filename ) {

			$filename = sprintf(
				'<a href="%s">%s</a>',
				esc_url( wp_get_attachment_url( $this->post->ID ) ),
				$filename
			);
		}

		return $filename;
	}
896598
def get_files_information(self):
        
        if self.files == {}:
            self.get_files_types()

        for i in self.get_files():
            try:
                yield i, self.files[i], self.files_crc32[i]
            except KeyError:
                yield i, "", ""
1191155
def loadedFilenames( self ):
        
        output = []
        for i in range(self.uiContentsTREE.topLevelItemCount()):
            item = self.uiContentsTREE.topLevelItem(i)
            output.append(nativestring(item.filepath()))
        return output
768749
def _recursive_get_all_file_names(dir):
    
    if not dir:
        return []

    result = []
    for basedir, dirs, files in os.walk(dir):
        result.extend(files)

    return result