<filesystem>
Include the header <filesystem> to define classes and functions for the manipulation of files and directories.
#include <filesystem>
Warning
The <filesystem> header is not a C++ standard, although it is being proposed for standardization. If it is adopted as a standard, we will investigate the impact on the interface.
Typedefs
Name |
Description |
---|---|
path |
basic_path<string, path_traits> |
wpath |
basic_path<wstring, wpath_traits> |
filesystem_error |
basic_filesystem_error<path> |
wfilesystem_error |
basic_filesystem_error<wpath> |
directory_entry |
basic_directory_entry<path> |
wdirectory_entry |
basic_directory_entry<wpath> |
directory_iterator |
basic_directory_iterator<path> |
wdirectory_iterator |
basic_directory_iterator<wpath> |
recursive_directory_iterator |
basic_recursive_directory_iterator<path> |
wrecursive_directory_iterator |
basic_recursive_directory_iterator<wpath> |
Classes
Name |
Description |
---|---|
Describes an object that is returned by *X, where X is a basic_directory_iterator or a basic_recursive_directory_iterator. |
|
Describes an input iterator that sequences through the file names in a file-system directory. |
|
A base class for exceptions that are thrown to report a low-level system overflow. |
|
Defines a class that stores an object of template type String that is suitable for use as a file name. |
|
Describes an input iterator that sequences through the file names in a file-system directory. The iterator can also descend into subdirectories. |
|
Wraps a file_type. |
Structs
Name |
Description |
---|---|
Defines a struct that has a static data member that represents a colon character. |
|
Defines a struct that has a static data member that represents a dot character. |
|
Specifies whether a type is suitable for use as a Path parameter for other templates that are defined in the <filesystem> header. |
|
Describes properties for the specialization basic_path<string, path_traits>. |
|
Defines a struct that has a static data member that represents a slash character. |
|
Holds information about a volume. |
|
Describes properties for the specialization basic_path<wstring, wpath_traits>. |
Functions
Name |
Description |
---|---|
Returns the stem of a specified path. |
|
Creates a full path from specified Path values, if possible. |
|
Copies the attributes and contents in one file and pastes them in another. |
|
Creates a directory from a specified file name. Also creates intermediate directories as required. |
|
Creates a directory from a specified file name. |
|
Creates a hard link to an existing file. |
|
Creates a symbolic link to an existing file. |
|
Sets or retrieves the current working directory. |
|
Specifies whether two file names reference the same file. |
|
Specifies whether a file exists. |
|
Retrieves the file name extension of a specified file. |
|
Returns the size, in bytes, of a file that has a specified name. |
|
Returns the current working directory at program startup. |
|
Indicates whether the specified file_status or file name represents a directory. |
|
Indicates whether a specified path refers to an empty file or directory. |
|
Indicates whether the specified file_status or file name represents an existing file that is not a file, a directory, or a symbolic link. |
|
Indicates whether the specified file_status or file name represents a file. |
|
Indicates whether the specified file_status or file name represents a file. |
|
Indicates whether the specified file_status or file name represents a symbolic link. |
|
Determines the last write time for a specified file. |
|
Removes a file that has the specified path. |
|
Removes a file or directory that has the specified path. |
|
Removes a directory that has the specified path. |
|
Removes a file that has the specified path. |
|
Renames an existing file. |
|
Replaces the file name extension of the specified file. |
|
Retrieves information about a specified volume. |
|
Retrieves the status of the specified file. |
|
Specifies whether a given file status is known. |
|
Returns the stem of the specified path. |
|
Exchanges the stored file names of two basic_path objects. |
|
Retrieves the symbolic link status of a specified file. |
|
Converts a given file name to a complete file name, if possible. |
Operators
Name |
Description |
---|---|
Inequality operator that is used with basic_path, basic_directory_iterator, and basic_recursive_directory_iterator objects. |
|
Equality operator that is used with basic_path, basic_directory_iterator, and basic_recursive_directory_iterator objects. |
|
Writes the stored path of the specified object to a stream. |
|
Indicates whether the stored string value of one basic_path object is less than that of another basic_path object. |
|
Indicates whether the stored string value of one basic_path object is less than or equal to that of another basic_path object. |
|
Extracts a string from a basic_istream and assigns it to a Path object. |
|
Indicates whether the stored string value of one basic_path object is greater than that of another basic_path object. |
|
Indicates whether the stored string value of one basic_path object is greater than or equal to that of another basic_path object. |
|
Concatenates the stored file names of two basic_path objects. |
Enumerations
Name |
Description |
---|---|
An enumeration that is used with copy_file and determines behavior if a destination file already exists. |
|
An enumeration for file types. |