Package osh :: Module file :: Class File
[frames] | no frames]

Class File

source code

object --+        
         |        
basestring --+    
             |    
           str --+
                 |
                File

Instance Methods
a new object with type S, a subtype of T
__new__(self, dir, file=None) source code
 
__init__(self, dir, file=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__reduce__(self)
helper for pickle
source code

Inherited from str: __add__, __contains__, __eq__, __ge__, __getattribute__, __getitem__, __getnewargs__, __getslice__, __gt__, __hash__, __le__, __len__, __lt__, __mod__, __mul__, __ne__, __repr__, __rmod__, __rmul__, __str__, capitalize, center, count, decode, encode, endswith, expandtabs, find, index, isalnum, isalpha, isdigit, islower, isspace, istitle, isupper, join, ljust, lower, lstrip, replace, rfind, rindex, rjust, rsplit, rstrip, split, splitlines, startswith, strip, swapcase, title, translate, upper, zfill

Inherited from object: __delattr__, __reduce_ex__, __setattr__

Class Variables
  abspath = property(lambda self: os.path.abspath(self), doc= ""...
  stat = property(lambda self: self._stat(), doc= """Information...
  mode = property(lambda self: self._stat() [0], doc= """mode of...
  inode = property(lambda self: self._stat() [1], doc= """inode ...
  device = property(lambda self: self._stat() [2], doc= """devic...
  links = property(lambda self: self._stat() [3], doc= """ Numbe...
  uid = property(lambda self: self._stat() [4], doc= """Owner of...
  gid = property(lambda self: self._stat() [5], doc= """Owning g...
  size = property(lambda self: self._stat() [6], doc= """Size of...
  atime = property(lambda self: self._stat() [7], doc= """Access...
  mtime = property(lambda self: self._stat() [8], doc= """Modify...
  ctime = property(lambda self: self._stat() [9], doc= """Change...
  isdir = property(lambda self: self.mode & FILE_TYPE_MASK== DIR...
  isfile = property(lambda self: self.mode & FILE_TYPE_MASK== FI...
  islink = property(lambda self: self.mode & FILE_TYPE_MASK== LI...
Properties

Inherited from object: __class__

Method Details

__new__(self, dir, file=None)

source code 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__
(inherited documentation)

__init__(self, dir, file=None)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

__reduce__(self)

source code 

helper for pickle

Overrides: object.__reduce__
(inherited documentation)

Class Variable Details

abspath

Value:
property(lambda self: os.path.abspath(self), doc= """Absolute path to \
this file.""")

stat

Value:
property(lambda self: self._stat(), doc= """Information on this file, \
as returned by C{os.stat}.""")

mode

Value:
property(lambda self: self._stat() [0], doc= """mode of this file.""")

inode

Value:
property(lambda self: self._stat() [1], doc= """inode of this file."""\
)

device

Value:
property(lambda self: self._stat() [2], doc= """device of this file.""\
")

links

Value:
property(lambda self: self._stat() [3], doc= """ Number of links of th\
is file.""")

uid

Value:
property(lambda self: self._stat() [4], doc= """Owner of this file."""\
)

gid

Value:
property(lambda self: self._stat() [5], doc= """Owning group of this f\
ile.""")

size

Value:
property(lambda self: self._stat() [6], doc= """Size of this file (byt\
es).""")

atime

Value:
property(lambda self: self._stat() [7], doc= """Access time of this fi\
le.""")

mtime

Value:
property(lambda self: self._stat() [8], doc= """Modify time of this fi\
le.""")

ctime

Value:
property(lambda self: self._stat() [9], doc= """Change time of this fi\
le.""")

isdir

Value:
property(lambda self: self.mode & FILE_TYPE_MASK== DIR_MASK, doc= """T\
rue iff this file is a directory.""")

isfile

Value:
property(lambda self: self.mode & FILE_TYPE_MASK== FILE_MASK, doc= """\
True iff this file is neither a directory nor a symlink.""")

islink

Value:
property(lambda self: self.mode & FILE_TYPE_MASK== LINK_MASK, doc= """\
True iff this file is a symlink.""")