diff options
author | hut <hut@lavabit.com> | 2010-02-09 14:08:47 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-02-09 14:28:33 +0100 |
commit | a83460d88a9982f704f2327ce0df359341369c49 (patch) | |
tree | 5fb4599a414164ff3cf0f0f3d85ea22e2983aaf7 | |
parent | f4ff7c98fff7268cc7be8e7bebdd09f6e69b6e0b (diff) | |
download | ranger-a83460d88a9982f704f2327ce0df359341369c49.tar.gz |
fsobject: added is_directory/is_file attributes
-rw-r--r-- | ranger/fsobject/directory.py | 1 | ||||
-rw-r--r-- | ranger/fsobject/file.py | 3 | ||||
-rw-r--r-- | ranger/fsobject/fsobject.py | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/ranger/fsobject/directory.py b/ranger/fsobject/directory.py index 0d417c96..91d087af 100644 --- a/ranger/fsobject/directory.py +++ b/ranger/fsobject/directory.py @@ -34,6 +34,7 @@ class NoDirectoryGiven(Exception): pass class Directory(FileSystemObject, Accumulator, SettingsAware): + is_directory = True enterable = False load_generator = None cycle_list = None diff --git a/ranger/fsobject/file.py b/ranger/fsobject/file.py index 71bd7a3e..f646ce17 100644 --- a/ranger/fsobject/file.py +++ b/ranger/fsobject/file.py @@ -14,5 +14,4 @@ from .fsobject import FileSystemObject as SuperClass class File(SuperClass): - pass - + is_file = True diff --git a/ranger/fsobject/fsobject.py b/ranger/fsobject/fsobject.py index df7a989f..3721aa54 100644 --- a/ranger/fsobject/fsobject.py +++ b/ranger/fsobject/fsobject.py @@ -19,6 +19,8 @@ DOCUMENT_BASENAMES = 'README TODO LICENSE COPYING INSTALL'.split() from . import T_FILE, T_DIRECTORY, T_UNKNOWN, T_NONEXISTANT, BAD_INFO from ranger.shared import MimeTypeAware, FileManagerAware class FileSystemObject(MimeTypeAware, FileManagerAware): + is_file = False + is_directory = False content_loaded = False force_load = False path = None |