class_docstr: DataSource(destpath='.')
  
  A generic data source file (file, http, ftp, ...).
  
  DataSources can be local files or remote files/URLs.  The files may
  also be compressed or uncompressed. DataSource hides some of the
  low-level details of downloading the file, allowing you to simply pass
  in a valid file path (or URL) and obtain a file object.
  
  Parameters
  ----------
  destpath : str or None, optional
      Path to the directory where the source file gets downloaded to for
      use.  If `destpath` is None, a temporary directory will be created.
      The default path is the current directory.
  
  Notes
  -----
  URLs require a scheme string (``http://``) to be used, without it they
  will fail::
  
      >>> repos = DataSource()
      >>> repos.exists('www.google.com/index.html')
      False
      >>> repos.exists('http://www.google.com/index.html')
      True
  
  Temporary directories are deleted when the DataSource is deleted.
  
  Examples
  --------
  ::
  
      >>> ds = DataSource('/home/guido')
      >>> urlname = 'http://www.google.com/index.html'
      >>> gfile = ds.open('http://www.google.com/index.html')  # remote file
      >>> ds.abspath(urlname)
      '/home/guido/www.google.com/site/index.html'
  
      >>> ds = DataSource(None)  # use with temporary file
      >>> ds.open('/home/guido/foobar.txt')
      <open file '/home/guido.foobar.txt', mode 'r' at 0x91d4430>
      >>> ds.abspath('/home/guido/foobar.txt')
      '/tmp/tmpy4pgsP/home/guido/foobar.txt'
docstr: Searches for ``path`` and returns full path if found.
  
  If path is an URL, _findfile will cache a local copy and return the
  path to the cached file.  If path is a local file, _findfile will
  return a path to that local file.
  
  The search will include possible compressed versions of the file
  and return the first occurrence found.
docstr_tok: ["Searches","for","``","path","``","and","returns","full","path","if","found",".","If","path","is","an","URL",",","_findfile","will","cache","a","local","copy","and","return","the","path","to","the","cached","file",".","If","path","is","a","local","file",",","_findfile","will","return","a","path","to","that","local","file",".","The","search","will","include","possible","compressed","versions","of","the","file","and","return","the","first","occurrence","found","."]
code: def _findfile(self, path):
      """Searches for ``path`` and returns full path if found.
  
      If path is an URL, _findfile will cache a local copy and return the
      path to the cached file.  If path is a local file, _findfile will
      return a path to that local file.
  
      The search will include possible compressed versions of the file
      and return the first occurrence found.
  
      """
  
      # Build list of possible local file paths
      if not self._isurl(path):
          # Valid local paths
          filelist = self._possible_names(path)
          # Paths in self._destpath
          filelist += self._possible_names(self.abspath(path))
      else:
          # Cached URLs in self._destpath
          filelist = self._possible_names(self.abspath(path))
          # Remote URLs
          filelist = filelist + self._possible_names(path)
  
      for name in filelist:
          if self.exists(name):
              if self._isurl(name):
                  name = self._cache(name)
              return name
      return None
  
imports: from __future__ import division, absolute_import, print_function
  import os
  import sys
  import warnings
  import shutil
  import io
  from numpy.core.overrides import set_module
label_desc: Use image node_id 9 for calling the DataSource obj's underlying member method code with example usage: obj._findfile(path) and returns: None, name