Package libxyz :: Package vfs :: Module vfsobj :: Class VFSObject |
[hide private]
[frames] | no frames]

# Class VFSObject

source code

    object --+
             |
            VFSObject

Abstract interface for VFS objects

Instance Methods | [hide private]
__init__(self, xyz, path, full_path, ext_path, driver, parent, enc=None, **kwargs) x.__init__(...) initializes x; see x.__class__.__doc__ for signature | source code
is_file(self) Return True if instance is representing regular file | source code
is_dir(self) Return True if instance is representing directory | source code
is_dir_empty(self) Return True if instance is representing directory and it is empty | source code
is_link(self) Return True if instance is representing soft link | source code
is_char(self) Return True if instance is representing soft char device | source code
is_block(self) Return True if instance is representing block device | source code
is_fifo(self) Return True if instance is representing FIFO | source code
is_socket(self) Return True if instance is representing socket | source code
copy(self, path, existcb=None, errorcb=None, save_attrs=True, follow_links=False, cancel=None) Copy file to specified location | source code
move(self, path, existcb=None, errorcb=None, save_attrs=True, follow_links=False, cancel=None) Move object Arguments are the same as for copy() | source code
mkdir(self, newdir) Create new dir inside object (only valid for directory object types) | source code
remove(self, recursive=True) [Recursively] remove object | source code
walk(self) Directory tree generator | source code
__repr__(self) repr(x) | source code
__unicode__(self) | source code
_prepare(self) | source code
Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__str__`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, xyz, path, full_path, ext_path, driver, parent, enc=None, **kwargs) (Constructor) | source code
x.__init__(...) initializes x; see x.__class__.__doc__ for signature Overrides: object.__init__ (inherited documentation)

### copy(self, path, existcb=None, errorcb=None, save_attrs=True, follow_links=False, cancel=None) | source code
Copy file to specified location Parameters: `path` - Local path to copy file to `existcb` - Callback function to be called if there exists an object in target directory with the same name. Callback function receives VFSObject instance as an argument and must return one of: 'override' - to override this very object 'override all' - to override any future collisions 'skip' - to skip the object 'skip all' - to skip all future collisions 'abort' - to abort the process. If no existscb provided 'abort' is used as default `errorcb` - Callback function to be called in case an error occured during copying. Function receives VFSObject instance and error string as arguments and must return one of: 'skip' - to continue the process 'skip all' - to skip all future errors 'abort' - to abort the process. If no errorcb provided 'abort' is used as default `save_attrs` - Whether to save object attributes `follow_links` - Whether to follow symlinks `cancel` - a threading.Event instance, if it is found set - abort

### __repr__(self) (Representation operator) | source code
repr(x) Overrides: object.__repr__ (inherited documentation)