Beispiel #1
0
 def list(self):
     widgets = ["Listing directory content... ",
                Bar('>'), ' ', RotatingMarker(), ' ', ReverseBar('<')]
     pbar = ProgressBar(widgets=widgets, maxval=100).start()
     pbar.update(0)
     time.sleep(0.5)
     if self.recursive:
         logger.debug("Listing directory content recursively...")
         pbar.update(20)
         time.sleep(1)
         self.total_size, self.fileList = util.recursiveListFiles(self.dir, self.hidden)
     else:
         logger.debug("Listing directory content...")
         pbar.update(20)
         time.sleep(1)
         self.total_size, self.fileList = util.listFiles(self.dir, self.hidden)
     pbar.update(100)
     pbar.finish()
     logger.debug("Supported File Types: " + repr(doctype.__all__))
     logger.info("Size of directory - %d" % self.total_size)