The os library aims to simplify and improve the process of performing operations on file systems with the <filesystem>
library.
Defined in header os.hpp
Defined in namespace os::path
Enum | Description |
---|---|
CopyOption | specifies the type of copy operation to use |
TraversalOption | specifies what type of filesystem traversal to use |
SizeMetric | specifies what unit of measurement to use in file sizes |
Defined in header os.hpp
Defined in namespace os::path
Function | Description |
---|---|
absolutePath | returns the absolute path of a given relative path |
copy | copies a file or directory |
create | creates a new file or directory |
currentPath | returns the absolute path you are currently in |
directorySeparator | returns a directory separator character |
execute | execute a command |
exists | checks if the given path exists |
fileExtension | returns the file extension of a given path or filename |
size | returns the size of a given path |
filename | returns the filename of a given path |
find | finds a given file |
findAll | finds multiple of the same file |
hasFileExtension | checks if a given path or filename has an extension |
hasSameContent | checks if two directories have the same files or if two files have the same data |
isAbsolutePath | checks if the given path is an absolute path |
isDirectoryString | checks if the given string has a trailing separator |
isDirectorySeparator | checks if a given character is a directory separator character |
isRelativePath | checks if the given path is a relative path |
isValidFilenameChar | checks if the given character is valid for filenames |
joinPath | concatenates two or more paths together |
move | moves a file or directory |
normalizePath | converts a path to work with the current operating system |
parentPath | returns the parent directory of a path |
relativePath | returns a path relative to another path |
remove | deletes a path |
rename | renames a file or directory |
rootName | returns the name of the root |
sourcePath | returns the absolute path to the executable |