Returns the URLs of all files attached to posts in the thread.
321965
def files(self):
        """"""
        if self.topic.has_file:
            yield self.topic.file.file_url
        for reply in self.replies:
            if reply.has_file:
                yield reply.file.file_url
311931
public List<FileInfo> getFileInfos(List<URI> paths) throws IOException {
    checkArgument(paths != null, "paths must not be null");
    logger.atFine().log("getFileInfos(%d paths)", paths.size());

    if (paths.size() == 1) {
      return new ArrayList<>(Collections.singleton(getFileInfo(paths.get(0))));
    }

    int maxThreads = gcs.getOptions().getBatchThreads();
    ExecutorService fileInfoExecutor =
        maxThreads == 0
            ? MoreExecutors.newDirectExecutorService()
            : Executors.newFixedThreadPool(
                Math.min(maxThreads, paths.size()), DAEMON_THREAD_FACTORY);
    try {
      List<Future<FileInfo>> infoFutures = new ArrayList<>(paths.size());
      for (URI path : paths) {
        infoFutures.add(fileInfoExecutor.submit(() -> getFileInfo(path)));
      }
      fileInfoExecutor.shutdown();

      List<FileInfo> infos = new ArrayList<>(paths.size());
      for (Future<FileInfo> infoFuture : infoFutures) {
        try {
          infos.add(infoFuture.get());
        } catch (InterruptedException | ExecutionException e) {
          if (e instanceof InterruptedException) {
            Thread.currentThread().interrupt();
          }
          throw new IOException(
              String.format("Failed to getFileInfos for %d paths", paths.size()), e);
        }
      }
      return infos;
    } finally {
      fileInfoExecutor.shutdownNow();
    }
  }
1280466
def get_urls(self):
        
        urls = super(PageAdmin, self).get_urls()
        my_urls = patterns('',
            (r'^add/preview$', self.admin_site.admin_view(PagePreviewView.as_view())),
            (r'^(?P<id>\d+)/preview$', self.admin_site.admin_view(PagePreviewView.as_view())),
            (r'^(?P<id>\d+)/history/(\d+)/preview$', self.admin_site.admin_view(PagePreviewView.as_view())),
        )
        return my_urls + urls
942514
def files(self, query, **kwargs):
        
        self.url = 'https://slack.com/api/search.files'
        return super(Search, self).search_from_url(query, **kwargs)
414873
def all_posts(self):
        """"""
        rev = self.db.get('site:rev')
        if int(rev) != self.revision:
            self.reload_site()

        return self._all_posts
497210
def documents_upload(ctx, max_threads, files):
    """"""
    if len(files) == 0:
        click.echo(ctx.get_help())
        return

    files = list(files)

    bar = click.progressbar(length=sum([_file_size(x) for x in files]), label="Uploading... ")
    run_via_threadpool(
        ctx.obj["API"].Documents.upload,
        files,
        {"progressbar": bar},
        max_threads=max_threads,
        graceful_exit=False,
    )
238642
def files(self) -> List[str]:
        
        _all = []
        for path, _, files in os.walk(str(self.path)):
            if '.git' in path:
                continue
            for name in files:
                _all.append(os.path.join(path, name))
        return _all
974436
protected function _getURLs() {
		if ($this->_post) {
			$this->_sendPost();
		}
		if ($this->_fill_urls) {
			$this->_getFillURLs();
		}
		if (is_array($this->_urls) == false OR count($this->_urls) < 1) {
			return false;
		}
		foreach ($this->_urls as $name => $url) {
			$this->_setHTML($url);
			$this->_getMatch($name);
			$this->_getMatchAll($name);
		}
	}
26924
def files(self):
        ''
        for _f in self.searchresult.files.iterchildren():
            yield ProtoFile.factory(_f, jfs=self.jfs, parentpath=unicode(_f.abspath))
981400
def prepend_urls(self):
        
        return [
            url(r"^(?P<resource_name>%s)/view/(?P<name>[\w\d_.-]+)%s$" % (self._meta.resource_name, trailing_slash()),
                self.wrap_view('view'), name="api_fileitem_view"),
            url(r"^(?P<resource_name>%s)/download/(?P<name>[\w\d_.-]+)%s$" % (
            self._meta.resource_name, trailing_slash()), self.wrap_view('download'), name="api_fileitem_download"),
            url(r"^(?P<resource_name>%s)/(?P<pk>\w[\w/-]*)/download%s$" % (self._meta.resource_name, trailing_slash()),
                self.wrap_view('download'), name="api_fileitem_download"),
            url(r"^(?P<resource_name>%s)/(?P<name>[\w\d_.-]+)/download%s$"
                % (self._meta.resource_name, trailing_slash()), self.wrap_view('download'),
                name="api_fileitem_download"),
            url(r"^(?P<resource_name>%s)/(?P<pk>\w[\w/-]*)/view%s$"
                % (self._meta.resource_name, trailing_slash()), self.wrap_view('view'), name="api_fileitem_view"),
            url(r"^(?P<resource_name>%s)/(?P<name>[\w\d_.-]+)/view%s$"
                % (self._meta.resource_name, trailing_slash()), self.wrap_view('view'), name="api_fileitem_view"),
            url(r"^(?P<resource_name>%s)/(?P<name>[\w\d_.-]+)/$"
                % self._meta.resource_name, self.wrap_view('dispatch_detail'), name="api_dispatch_detail_name"),
            url(r"^(?P<resource_name>%s)/(?P<id>[\d]+)/$"
                % self._meta.resource_name, self.wrap_view('dispatch_detail'), name="api_dispatch_detail"),
        ]
1067608
public static Iterable<File> findFiles(final Collection<URL> inUrls, final Predicate<File> filePredicate) {
        Iterable<File> result = new ArrayList<File>();

        for (final URL url : inUrls) {
            try {
                result = Iterables.concat(result,
                        Iterables.filter(new Iterable<File>() {
                            public Iterator<File> iterator() {
                                return fromURL(url).getFiles().iterator();
                            }
                        }, filePredicate));
            } catch (Throwable e) {
                if (Reflections.log != null) {
                    Reflections.log.error("could not findFiles for url. continuing. [" + url + "]", e);
                }
            }
        }

        return result;
    }
1164638
def get_urls(self):
        
        urls = super(PageAdmin, self).get_urls()
        my_urls = [
            url(r'^get_layout/$', self.admin_site.admin_view(self.get_layout_view))
        ]
        return my_urls + urls
1039059
function getAllOpenFiles() {
        var result = getWorkingSet(ALL_PANES);
        _.forEach(_panes, function (pane) {
            var file = pane.getCurrentlyViewedFile();
            if (file) {
                result = _.union(result, [file]);
            }
        });
        return result;
    }
30493
def get_allposts(self):
		''' 
		'''
		result = self.client.posts(self.blog, offset = 0, limit = 1)
		try: 
			total_posts = result['total_posts']
		except:
			raise phasetumblr_errors.TumblrBlogException(result['meta']['msg'])

		delta = (total_posts / 10) + 1

		all_posts = []
		posts_ids = []
		for j in range(delta):
			start = j * 10
			end = (j + 1) * 10
			posts = self.client.posts(self.blog, offset = start, limit = end)['posts']
			if not len(posts):
				break
			for i in posts:
				if i['id'] in posts_ids:
					continue
				description = split_body(i['body'])
				body = split_body(i['body'], 1)
				post = {}
				post['title'] = i['title']
				post['link'] = i['post_url']
				post['date'] = datetime.strptime(i['date'], '%Y-%m-%d %H:%M:%S %Z')
				post['tags'] = i['tags']
				post['id'] = i['id']
				post['body'] = body
				post['description'] = description
				all_posts.append(post)
				posts_ids.append(i['id'])

		newlist = sorted(all_posts, key=lambda k: k['date']) 
		return newlist
346832
def all_resource_urls(query):
    '''  '''
    urls = []
    next = True
    while next:
        response = requests.get(query)
        json_data = json.loads(response.content)
        for resource in json_data['results']:
            urls.append(resource['url'])
        if bool(json_data['next']):
            query = json_data['next']
        else:
            next = False
    return urls
436067
def ListThreads(self):
    
    if self.inferior.is_running:
      return self.inferior.threads
    logging.error('Not attached to any process.')
    return []
254528
function getPostPaths (dir) {
  return fs.readdir(dir).then(function (files) {
    return all(files.map(function (file) {
      var path = pathify(dir, file);
      return fs.stat(path).then(function (stats) {
        return stats.isDirectory() ?
          getPostPaths(path) :
          path;
      });
    }));
  }).then(function (files) {
    return _.flatten(files);
  });
}