about summary refs log tree commit diff stats
path: root/code/fsobject.py
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-11-24 02:02:04 +0100
committerhut <hut@lavabit.com>2009-11-24 02:02:04 +0100
commit798d06a2317a5bb4ee38cec4d1d4f5d428d75593 (patch)
tree335fa4def2632c91acd11e4cee9aac32f9ddd15b /code/fsobject.py
parent556d84cd0fa94372c3fc2eb722f6925e61c42778 (diff)
downloadranger-798d06a2317a5bb4ee38cec4d1d4f5d428d75593.tar.gz
stuff
Diffstat (limited to 'code/fsobject.py')
-rw-r--r--code/fsobject.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/code/fsobject.py b/code/fsobject.py
index 1e194ac9..148976d2 100644
--- a/code/fsobject.py
+++ b/code/fsobject.py
@@ -17,6 +17,8 @@ class FSObject(object):
 		self.islink = False
 		self.brokenlink = False
 		self.stat = None
+		self.infostring = None
+		self.permissions = None
 		self.type = fstype.Unknown
 
 	# load() reads useful information about the file from the file system
@@ -34,10 +36,17 @@ class FSObject(object):
 
 			if os.path.isdir(self.path):
 				self.type = fstype.Directory
+				self.infostring = '--'
 			elif os.path.isfile(self.path):
 				self.type = fstype.File
+				self.infostring = ' %d' % self.stat.st_size
+			else:
+				self.type = fstype.Unknown
+				self.infostring = None
+
 		except OSError:
 			self.islink = False
+			self.infostring = None
 			self.type = fstype.Nonexistent
 			self.exists = False
 			self.accessible = False