ranger.fsobject.file
index
/home/hut/code/ranger/ranger/fsobject/file.py

# Copyright (C) 2009, 2010  Roman Zimbelmann <romanz@lavabit.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

 
Modules
       
re
zipfile

 
Classes
       
ranger.fsobject.fsobject.FileSystemObject(ranger.shared.mimetype.MimeTypeAware, ranger.shared.FileManagerAware)
File

 
class File(ranger.fsobject.fsobject.FileSystemObject)
    
Method resolution order:
File
ranger.fsobject.fsobject.FileSystemObject
ranger.shared.mimetype.MimeTypeAware
ranger.shared.FileManagerAware
ranger.shared.Awareness
builtins.object

Methods defined here:
get_preview_source(self)
has_preview(self)
is_binary(self)

Data descriptors defined here:
firstbytes

Data and other attributes defined here:
is_file = True

Methods inherited from ranger.fsobject.fsobject.FileSystemObject:
__init__(self, path, preload=None, path_is_abs=False)
__repr__(self)
__str__(self)
returns a string containing the absolute path
get_permission_string(self)
load(self)
reads useful information about the filesystem-object from the
filesystem and caches it for later use
load_if_outdated(self)
Calls load() if the currently cached information is outdated
or nonexistant.
mark(self, boolean)
set_mimetype(self)
assign attributes such as self.video according to the mimetype
use(self)
Used in garbage-collecting.  Override in Directory

Data descriptors inherited from ranger.fsobject.fsobject.FileSystemObject:
mimetype
mimetype_tuple

Data and other attributes inherited from ranger.fsobject.fsobject.FileSystemObject:
accessible = False
audio = False
basename = None
basename_lower = None
container = False
content_loaded = False
dirname = None
document = False
exists = False
extension = None
filetype = None
force_load = False
image = False
infostring = None
is_device = False
is_directory = False
is_fifo = False
is_link = False
is_socket = False
loaded = False
marked = False
media = False
path = None
permissions = None
realpath = None
runnable = False
shell_escaped_basename = None
size = 0
stat = None
stopped = False
tagged = False
video = False

Data descriptors inherited from ranger.shared.mimetype.MimeTypeAware:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Data and other attributes inherited from ranger.shared.mimetype.MimeTypeAware:
mimetypes = {}

Data and other attributes inherited from ranger.shared.FileManagerAware:
fm = None

 
Data
        N_FIRST_BYTES = 20
PREVIEW_BLACKLIST = <_sre.SRE_Pattern object>
PREVIEW_WHITELIST = <_sre.SRE_Pattern object>
control_characters = set(['\x00', '\x01', '\x02', '\x03', '\x04', '\x05', ...])