Main constructor to build new Path from string
Constructor that allows to build path from segments
Append data to file as is
Returns base name of current path
Change current working directory to this.
Change current working directory to path inside currect path
Copy single file to destination. If destination does not exists, then file will be copied exactly to that path. If destination already exists and it is directory, then method will try to copy file inside that directory with same name. If destination already exists and it is file, then depending on rewrite param file will be owerwritten or PathException will be thrown.
Copy file or directory to destination If source is a file, then copyFileTo will be use to copy it. If source is a directory, then more complex logic will be applied:
Execute the file pointed by path
Execute the file pointed by path
Check if path exists
Expand tilde (~) in current path.
Returns extension for current path
Get attributes of the path
Return size of file specified by path
Search files that match provided glob pattern inside current path.
Check if file has numeric attributes. This method check if all bits specified by param 'attributes' are set.
Check if path is absolute
Determine if path is directory.
Determine if path is file.
Check if current path is inside other path
Check if current path is root (does not have parent)
Check if path starts at root directory (or drive letter)
Determine if path is symlink
Check if path is valid.
Join multiple path segments and return single path.
Check if path matches specified glob pattern. See Also: - https://en.wikipedia.org/wiki/Glob_%28programming%29 - https://dlang.org/phobos/std_path.html#globMatch
Create directory by this path
Normalize path.
Override comparison operators to use OS-specific case-sensitivity rules. They could be used for sorting of path array for example.
Override equality comparison operators
Open file and return std.stdio.File struct with opened file
determine parent path of this path
Read entire contents of file name and returns it as an untyped array. If the file size is larger than upTo, only upTo bytes are _read.
Read text content of the file. Technicall just a call to std.file.readText.
Resolve link and return real path. Available only for posix systems. If path is not symlink, then return it unchanged
Get real path with all symlinks resolved. If any segment of path is symlink, then this method will automatically resolve that segment.
Return this path as relative to base
Remove file or directory referenced by this path. This operation is recursive, so if path references to a direcotry, then directory itself and all content inside referenced dir will be removed
Rename current path.
Search file by name in current directory and parent directories. Usually, this could be used to find project config, when current directory is somewhere inside project.
Split path on segments. Under the hood, this method uses std.path.pathSplitter
Set attributes of the path
Create symlink for this file in dest path.
Convert path to absolute path.
Compute hash of the Path to be able to use it as key in asociative arrays.
Return path as string
Iterate over all files and directories inside path;
Just an alias for walk(SpanModel.breadth)
Just an alias for walk(SpanModel.depth)
Write data to file as is
Return current path (as absolute path)
Path - struct that represents single path object, and provides convenient interface to deal with filesystem paths.