Commits

wump  committed ed766c4

add list utility

  • Participants
  • Parent commits ae453d5

Comments (0)

Files changed (2)

File fattr/attrstorage.py

                 if verbose:
                     print "del", name
 
+    @property
     def files(self):
         return self.db.iterkeys()
 
+#!/usr/bin/env python
+"""
+Usage: list.py <dbfile>
+"""
+from fattr.attrstorage import AttrStorage
+
+def main(argv):
+    a = AttrStorage(argv[1], "r")
+    for name in a.files:
+        print name, a.get_info(name)
+
+if __name__ == "__main__":
+    import sys
+    main(sys.argv) 
+