Logo Search packages:      
Sourcecode: namebench version File versions  Download package

def libnamebench::history_parser::HistoryParser::FindGlobPaths (   self,
  paths 
)

Given a list of glob paths, return a list of matches containing data.

Returns:
  A tuple with (file path (str), list of paths checked)

Definition at line 221 of file history_parser.py.

00221                                 :
    """Given a list of glob paths, return a list of matches containing data.

    Returns:
      A tuple with (file path (str), list of paths checked)
    """
    tried = []
    found = []
    if sys.platform[:3] == 'win':
      paths = self._AddRoamLocalWindowsPaths(paths)

    for path_elements in paths:
      # path contains an environment variable that we could not resolve.
      if False in path_elements:
        continue
      path = os.path.join(*path_elements)
      tried.append(path)
      for filename in glob.glob(path):
        if os.path.getsize(filename) > self.MIN_FILE_SIZE:
          found.append(filename)
        else:
          print "* %s exists, but is only %s bytes" % (filename, os.path.getsize(filename))

    return (found, tried)

  def GoogleChromeHistoryPath(self):


Generated by  Doxygen 1.6.0   Back to index