class documentation

class FilePath(object): (source)

Known subclasses: zim.newfs.base.FSObjectBase

View In Hierarchy

Class to represent filesystem paths and the base class for all file and folder objects. Contains methods for file path manipulation.

File paths should always be absolute paths and can e.g. not start with "../" or "./". On windows they should always start with either a drive letter or a share drive. On unix they should start at the root of the filesystem.

Paths can be handled either as strings representing a local file path ("/" or "" separated), strings representing a file uri ("file:///" or "smb://") or list of path names.

Class Method new_from_zim_config Returns a new object based on the string representation for that path
Method __eq__ Undocumented
Method __init__ Undocumented
Method __repr__ Undocumented
Method __str__ Undocumented
Method commonparent Undocumented
Method get_abspath No summary
Method get_childpath Undocumented
Method ischild Undocumented
Method parent Undocumented
Method parents Undocumented
Method relpath Undocumented
Method serialize_zim_config Returns the file path as string for serializing the object
Class Variable __slots__ Undocumented
Instance Variable islocal Undocumented
Instance Variable path Undocumented
Instance Variable pathnames Undocumented
Property basename Undocumented
Property dirname Undocumented
Property uri Undocumented
Property userpath Undocumented
@classmethod
def new_from_zim_config(klass, string): (source)
Returns a new object based on the string representation for that path
def __eq__(self, other): (source)

Undocumented

def __init__(self, path): (source)

Undocumented

def __repr__(self): (source)

Undocumented

def __str__(self): (source)

Undocumented

def commonparent(self, other): (source)

Undocumented

def get_abspath(self, path): (source)
Returns a FilePath for path where path can be either an absolute path or a path relative to this path (either upward or downward - use get_childpath() to only get child paths).
def get_childpath(self, path): (source)

Undocumented

def ischild(self, parent): (source)

Undocumented

def parent(self): (source)

Undocumented

def parents(self): (source)

Undocumented

def relpath(self, start, allowupward=False): (source)

Undocumented

def serialize_zim_config(self): (source)
Returns the file path as string for serializing the object
__slots__: tuple[str, ...] = (source)

Undocumented

islocal = (source)

Undocumented

path = (source)

Undocumented

pathnames = (source)

Undocumented

@property
basename = (source)

Undocumented

@property
dirname = (source)

Undocumented

Undocumented

@property
userpath = (source)

Undocumented