- class openpnm.models.phases.partition_coefficient.Path(*args, **kwargs)¶
PurePath subclass that can make system calls.
Path represents a filesystem path but unlike PurePath, also offers methods to do system calls on path objects. Depending on your system, instantiating a Path will return either a PosixPath or a WindowsPath object. You can also instantiate a PosixPath or WindowsPath directly, but cannot instantiate a WindowsPath on a POSIX system or vice versa.
The concatenation of the drive and root, or ‘’.
The drive prefix (letter or UNC path), if any.
The final path component, if any.
The logical parent of the path.
A sequence of this path’s logical parents.
An object providing sequence-like access to the components in the filesystem path.
The root of the path, if any.
The final path component, minus its last suffix.
The final component’s last suffix, if any.
A list of the final component’s suffixes, if any.
Return an absolute version of this path.
Return the string representation of the path with forward (/) slashes.
Return the path as a 'file' URI.
Change the permissions of the path, like os.chmod().
Return a new path pointing to the current working directory (as returned by os.getcwd()).
Whether this path exists.
Return a new path with expanded ~ and ~user constructs (as returned by os.path.expanduser)
Iterate over this subtree and yield all existing files (of any kind, including directories) matching the given relative pattern.
Return the group name of the file gid.
Return a new path pointing to the user's home directory (as returned by os.path.expanduser('~')).
True if the path is absolute (has both a root and, if applicable, a drive).
Whether this path is a block device.
Whether this path is a character device.
Whether this path is a directory.
Whether this path is a FIFO.
Whether this path is a regular file (also True for symlinks pointing to regular files).
Check if this path is a POSIX mount point
Return True if the path contains one of the special names reserved by the system, if any.
Whether this path is a socket.
Whether this path is a symbolic link.
Iterate over the files in this directory.
Combine this path with one or several arguments, and return a new path representing either a subpath (if all arguments are relative paths) or a totally different path (if one of the arguments is anchored).
Like chmod(), except if the path points to a symlink, the symlink's permissions are changed, rather than its target's.
Make the target path a hard link pointing to this path.
Like stat(), except if the path points to a symlink, the symlink's status information is returned, rather than its target's.
Return True if this path matches the given pattern.
mkdir([mode, parents, exist_ok])
Create a new directory at this given path.
open([mode, buffering, encoding, errors, ...])
Open the file pointed by this path and return a file object, as the built-in open() function does.
Return the login name of the file owner.
Open the file in bytes mode, read it, and close the file.
Open the file in text mode, read it, and close the file.
Return the relative path to another path identified by the passed arguments.
Rename this path to the target path.
Rename this path to the target path, overwriting if that path exists.
Make the path absolute, resolving all symlinks on the way and also normalizing it (for example turning slashes into backslashes under Windows).
Recursively yield all existing files (of any kind, including directories) matching the given relative pattern, anywhere in this subtree.
Remove this directory.
Return whether other_path is the same or not as this file (as returned by os.path.samefile()).
Return the result of the stat() system call on this path, like os.stat() does.
Make this path a symlink pointing to the target path.
Create this file with the given access mode, if it doesn't exist.
Remove this file or link.
Return a new path with the file name changed.
Return a new path with the file suffix changed.
Open the file in bytes mode, write to it, and close the file.
write_text(data[, encoding, errors])
Open the file in text mode, write to it, and close the file.