pyre.primitives¶
Package Contents¶
-
class
pyre.primitives.path¶ Bases:
tupleA representation of a path
-
_CWD= .¶
-
_SEP= /¶
-
root¶
-
chdir¶
-
chmod¶
-
lstat¶
-
stat¶
-
open¶
-
rmdir¶
-
unlink¶
-
__fspath__¶
-
as_posix(self)¶ Return a POSIX compliant representation
-
as_uri(self)¶ Return a POSIX compliant representation
-
isAbsolute(self)¶ Check whether the path is absolute or not
-
isReserved(self)¶ Check whether the path is reserved or not
-
join(self, *others)¶ Combine me with {others} and make a new path
-
relativeTo(self, other)¶ Find a {path} such that {other} / {path} == {self}
-
withName(self, name)¶ Build a new path with my name replaced by {name}
-
withSuffix(self, suffix=None)¶ Build a new path with my suffix replaced by {suffix}
-
resolve(self)¶ Build an equivalent absolute normalized path that is free of symbolic links
-
expanduser(self)¶ Build a path with ‘~’ and ‘~user’ patterns expanded
-
exists(self)¶ Check whether I exist
-
isBlockDevice(self)¶ Check whether I am a block device
-
isCharacterDevice(self)¶ Check whether I am a character device
-
isDirectory(self)¶ Check whether I am a directory
-
isFile(self)¶ Check whether I am a regular file
-
isNamedPipe(self)¶ Check whether I am a socket
-
isSocket(self)¶ Check whether I am a socket
-
isSymlink(self)¶ Check whether I am a symbolic link
-
mask(self, mask)¶ Get my stat record and filter me through {mask}
-
mkdir(self, parents=False, exist_ok=False, **kwds)¶ Create a directory at my location.
If {parents} is {True}, create all necessary intermediate levels; if {exist_ok} is {True}, do not raise an exception if the directory exists already
-
__str__(self)¶ Assemble my parts into a string
-
__bool__(self)¶ Test for non null values
-
__truediv__(self, other)¶ Syntactic sugar for assembling paths
-
__rtruediv__(self, other)¶ Syntactic sugar for assembling paths
-
_resolve(self, base=None, resolved=None)¶ Workhorse for path resolution
-
-
class
pyre.primitives.uri(scheme=None, authority=None, address=None, query=None, fragment=None)¶ -
_regex¶
-
__slots__= ['scheme', 'authority', 'address', 'query', 'fragment']¶
-
clone(self, scheme=None, authority=None, address=None, query=None, fragment=None)¶ Make a copy of me with the indicated replacements
-
__add__(self, other)¶ Enable concatenations
N.B.: this is not {join}; it just takes my string representation, adds {other} to the end, and attempts to parse the result as a {uri}
-
__str__(self)¶
-