adding file with File object
authorAlexandr Popov <popov2al@gmail.com>
Mon, 9 Mar 2009 15:09:28 +0000 (18:09 +0300)
committerAlexandr Popov <popov2al@gmail.com>
Mon, 9 Mar 2009 15:09:28 +0000 (18:09 +0300)
src/file.py [new file with mode: 0644]

diff --git a/src/file.py b/src/file.py
new file mode 100644 (file)
index 0000000..cabaad8
--- /dev/null
@@ -0,0 +1,16 @@
+#!/usr/bin/env python
+# -*-coding: utf-8 -*-
+# vim: sw=4 ts=4 expandtab ai
+# pylint: disable-msg=C0301
+
+class File(object):
+    
+    def show(self):
+        self.cur_ui.show(self.fl_path, self.fl_size)
+        
+    def __init__(self, ui, fpath, fsize):
+        if ui is 'console':
+            from consprint import ConsPrint
+            self.cur_ui = ConsPrint()
+        self.fl_path = fpath
+        self.fl_size = fsize