module documentation
Object-oriented filesystem path representation.
| Interface | |
File path object. |
| Class | |
Abstract implementation of an IFilePath; must be completed by a subclass. |
| Class | |
I am a path on the filesystem that only permits 'downwards' access. |
| Class | |
A class representing read/write/execute permissions. Instantiate with any portion of the file's mode that includes the permission bits. |
| 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?. |
| Exception | |
Error that is raised when the path provided to FilePath is invalid. |
| Exception | |
An error with symlinks - either that there are cyclical symlinks or that symlink are not supported on this platform. |
| Exception | |
An exception which is used to distinguish between errors which mean 'this is not a directory you can list' and other, more catastrophic errors. |
| Type Variable | |
Undocumented |
| Type Alias | |
Undocumented |
| Function | _as |
Return path as a string of bytes suitable for use on this system's filesystem. |
| Function | _as |
Return path as a string of unicode suitable for use on this system's filesystem. |
| Function | _coerce |
Return a newpath that is suitable for joining to path. |
| Function | _secure |
Compute a string usable as a new, temporary filename. |
| Constant | _CREATE |
Undocumented |
| Type Variable | _ |
Undocumented |
Return path as a string of bytes suitable for use on this system's filesystem.
| Parameters | |
path:bytes or unicode | The path to be made suitable. |
encoding:Optional[ | The encoding to use if coercing to bytes. If none is given, sys.getfilesystemencoding is used. |
| Returns | |
bytes | bytes |
def _coerceToFilesystemEncoding(path:
AnyStr, newpath: Union[ bytes, str], encoding: Optional[ str] = None) -> AnyStr:
(source)
¶
Return a newpath that is suitable for joining to path.
| Parameters | |
path:AnyStr | The path that it should be suitable for joining to. |
newpath:Union[ | The new portion of the path to be coerced if needed. |
encoding:Optional[ | If coerced, the encoding that will be used. |
| Returns | |
AnyStr | Undocumented |