[library-web] Add isdir() method to FakeTarInfo class



commit 94bf0f545606f573aad5df1135e7f1a0dc4049ae
Author: Frédéric Péters <fpeters 0d be>
Date:   Thu Jun 24 14:41:06 2010 +0200

    Add isdir() method to FakeTarInfo class

 src/utils.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/utils.py b/src/utils.py
index de43d8b..c3c1011 100644
--- a/src/utils.py
+++ b/src/utils.py
@@ -63,6 +63,9 @@ class FakeTarInfo:
     def __repr__(self):
         return '<FakeTarInfo \'%s\'>' % self.name
 
+    def isdir(self):
+        return os.path.isdir(self.path)
+
 def tryint(x):
     try:
         return int(x)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]