module documentation
(source)

Object-oriented filesystem path representation.

Variable islink Undocumented
Interface IFilePath File path object.
Class InsecurePath Error that is raised when the path provided to FilePath is invalid.
Class LinkError An error with symlinks - either that there are cyclical symlinks or that symlink are not supported on this platform.
Class UnlistableError An exception which is used to distinguish between errors which mean 'this is not a directory you can list' and other, more catastrophic errors.
Class AbstractFilePath Abstract implementation of an IFilePath; must be completed by a subclass.
Class RWX A class representing read/write/execute permissions for a single user category (i.e. user/owner, group, or other/world). Instantiate with three boolean values: readable? writable? executable?.
Class Permissions A class representing read/write/execute permissions. Instantiate with any portion of the file's mode that includes the permission bits.
Class FilePath I am a path on the filesystem that only permits 'downwards' access.
Variable _CREATE_FLAGS Undocumented
Function _stub_islink Always return False if the operating system does not support symlinks.
Function _secureEnoughString Compute a string usable as a new, temporary filename.
Function _asFilesystemBytes Return path as a string of bytes suitable for use on this system's filesystem.
Function _asFilesystemText Return path as a string of unicode suitable for use on this system's filesystem.
Function _coerceToFilesystemEncoding Return a newpath that is suitable for joining to path.
_CREATE_FLAGS = (source)

Undocumented

def _stub_islink(path): (source)

Always return False if the operating system does not support symlinks.

ParameterspathA path string. (type: str)
ReturnsFalse (type: bool)
islink = (source)

Undocumented

def _secureEnoughString(path): (source)

Compute a string usable as a new, temporary filename.

ParameterspathThe path that the new temporary filename should be able to be concatenated with.
ReturnsA pseudorandom, 16 byte string for use in secure filenames. (type: the type of path)
def _asFilesystemBytes(path, encoding=''): (source)

Return path as a string of bytes suitable for use on this system's filesystem.

ParameterspathThe path to be made suitable. (type: bytes or unicode)
encodingThe encoding to use if coercing to bytes. If none is given, sys.getfilesystemencoding is used. (type: str)
Returnsbytes (type: bytes)
def _asFilesystemText(path, encoding=None): (source)

Return path as a string of unicode suitable for use on this system's filesystem.

ParameterspathThe path to be made suitable. (type: bytes or unicode)
encodingThe encoding to use if coercing to unicode. If none is given, sys.getfilesystemencoding is used.
Returnsunicode
def _coerceToFilesystemEncoding(path, newpath, encoding=None): (source)

Return a newpath that is suitable for joining to path.

ParameterspathThe path that it should be suitable for joining to.
newpathThe new portion of the path to be coerced if needed.
encodingIf coerced, the encoding that will be used.
API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.