Main constructor to build new Path from string
Constructor that allows to build path from segments * Params: * segments = array of segments to build path from
Append data to file as is
Returns base name of current path
Change current working directory to this.
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: - if dest already exists and it is not dir, then exception will be raised. - if dest already exists and it is dir, then source dir will be copied inseide that dir with it's name - if dest does not exists, then current directory will be copied to dest path.
Check if path exists
Expand tilde (~) in current path.
Returns extension for current path
Return size of file specified by path
Check if path is absolute
Determine if path is directory.
Determine if path is file.
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.
Create directory by this path
Normalize path.
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.
Resolve link and return real path. Available only for posix systems. If path is not symlink, then return it unchanged
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.
Convert path to absolute path.
Return path as string
Iterate over all files and directories inside path;
Write data to file as is
Main struct to work with paths.