diff options
author | etobi <git@e-tobi.net> | 2011-10-10 21:04:28 +0200 |
---|---|---|
committer | etobi <git@e-tobi.net> | 2011-10-10 21:04:28 +0200 |
commit | a76ef77f45a6300333913ab168796bea50f53764 (patch) | |
tree | 2217686e8bae5991da25eb183d04879797f54c35 | |
parent | aad3cec396e544bf3d4c90eecdd1dc1527e69d14 (diff) | |
download | vdrnfofs-a76ef77f45a6300333913ab168796bea50f53764.tar.gz vdrnfofs-a76ef77f45a6300333913ab168796bea50f53764.tar.bz2 |
Dropped NodeAttributes class, use fuse.Stat directly
-rw-r--r-- | vdrnfofs/filesystemnodes.py | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/vdrnfofs/filesystemnodes.py b/vdrnfofs/filesystemnodes.py index da785c6..37999a8 100644 --- a/vdrnfofs/filesystemnodes.py +++ b/vdrnfofs/filesystemnodes.py @@ -38,19 +38,6 @@ import time from concatenated_file_reader import * from vdr import * -class NodeAttributes(fuse.Stat): - def __init__(self): - self.st_mode = 0 - self.st_ino = 0 - self.st_dev = 0 - self.st_nlink = 0 - self.st_uid = 0 - self.st_gid = 0 - self.st_size = 0 - self.st_atime = 0 - self.st_mtime = 0 - self.st_ctime = 0 - class FileNode(object): def __init__(self, path, extension): self.path = path @@ -63,7 +50,7 @@ class FileNode(object): return self._file_system_name def get_stat(self): - attr = NodeAttributes() + attr = fuse.Stat() attr.st_mode = stat.S_IFREG | stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH attr.st_nlink = 1 attr.st_size = self.size() @@ -168,7 +155,7 @@ class DirNode: return False def get_stat(self): - attr = NodeAttributes() + attr = fuse.Stat() attr.st_mode = stat.S_IFDIR | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH | stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH attr.st_nlink = 2 + len(self.content()) attr.st_mtime = os.path.getmtime(self.path) |