예제 #1
0
 def __init__(self, path):
     path = Path(path)
     size = None
     if path.exists():
         if path.is_link():
             self.comment = "Link to %s" % path.read_link(absolute=True)
         elif path.is_dir():
             self.comment = "Directory"
         else:
             size = path.size()
             self.comment = hsize(size)
     File.__init__(self, path, size)
예제 #2
0
 def __init__(self, path):
     path = Path(path)
     size = None
     if path.exists():
         if path.is_link():
             self.comment = "Link to %s" % path.read_link(absolute=True)
         elif path.is_dir():
             self.comment = "Directory"
         else:
             size = path.size()
             self.comment = hsize(size)
     File.__init__(self, path, size)