다음을 통해 공유


<filesystem>

Include the header <filesystem> to define classes and functions for the manipulation of files and directories.

#include <filesystem>

경고

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.

형식 정의

Name

설명

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>

클래스

Name

설명

basic_directory_entry 클래스

Describes an object that is returned by *X, where X is a basic_directory_iterator or a basic_recursive_directory_iterator.

basic_directory_iterator 클래스

Describes an input iterator that sequences through the file names in a file-system directory.

basic_filesystem_error 클래스

A base class for exceptions that are thrown to report a low-level system overflow.

basic_path 클래스

Defines a class that stores an object of template type String that is suitable for use as a file name.

basic_recursive_directory_iterator 클래스

Describes an input iterator that sequences through the file names in a file-system directory. The iterator can also descend into subdirectories.

file_status 클래스

file_type를 래핑합니다.

Structs

Name

설명

colon 구조체

콜론 문자를 나타내는 정적 데이터 멤버가 있는 struct 를 정의합니다.

dot 구조체

Defines a struct that has a static data member that represents a dot character.

is_basic_path 구조체

Specifies whether a type is suitable for use as a Path parameter for other templates that are defined in the <filesystem> header.

path_traits 구조체

Describes properties for the specialization basic_path<string, path_traits>.

slash 구조체

슬래쉬 문자를 나타내는 정적 데이터 멤버가 있는 struct 를 정의합니다.

space_info 구조체

Holds information about a volume.

wpath_traits 구조체

Describes properties for the specialization basic_path<wstring, wpath_traits>.

함수

Name

설명

basename 함수

Returns the stem of a specified path.

complete 함수

Creates a full path from specified Path values, if possible.

copy_file 함수

Copies the attributes and contents in one file and pastes them in another.

create_directories 함수

Creates a directory from a specified file name. Also creates intermediate directories as required.

create_directory 함수

Creates a directory from a specified file name.

create_hard_link 함수

Creates a hard link to an existing file.

create_symlink 함수

Creates a symbolic link to an existing file.

current_path 함수

Sets or retrieves the current working directory.

equivalent 함수

Specifies whether two file names reference the same file.

exists 함수

Specifies whether a file exists.

extension 함수

Retrieves the file name extension of a specified file.

file_size 함수

Returns the size, in bytes, of a file that has a specified name.

initial_path 함수

Returns the current working directory at program startup.

is_directory 함수

Indicates whether the specified file_status or file name represents a directory.

is_empty 함수

Indicates whether a specified path refers to an empty file or directory.

is_other 함수

Indicates whether the specified file_status or file name represents an existing file that is not a file, a directory, or a symbolic link.

is_regular 함수

Indicates whether the specified file_status or file name represents a file.

is_regular_file 함수

Indicates whether the specified file_status or file name represents a file.

is_symlink 함수

Indicates whether the specified file_status or file name represents a symbolic link.

last_write_time 함수

Determines the last write time for a specified file.

remove 함수

Removes a file that has the specified path.

remove_all 함수

Removes a file or directory that has the specified path.

remove_directory 함수

Removes a directory that has the specified path.

remove_filename 함수

Removes a file that has the specified path.

rename 함수

기존 파일을 이름을 바꿉니다.

replace_extension 함수

Replaces the file name extension of the specified file.

space 함수

Retrieves information about a specified volume.

status 함수

Retrieves the status of the specified file.

status_known 함수

Specifies whether a given file status is known.

stem 함수

Returns the stem of the specified path.

swap 함수(STL)

Exchanges the stored file names of two basic_path objects.

symlink_status 함수

Retrieves the symbolic link status of a specified file.

system_complete 함수

Converts a given file name to a complete file name, if possible.

연산자

Name

설명

operator!=(STL)

Inequality operator that is used with basic_path, basic_directory_iterator, and basic_recursive_directory_iterator objects.

operator==(STL)

Equality operator that is used with basic_path, basic_directory_iterator, and basic_recursive_directory_iterator objects.

operator<< 연산자

Writes the stored path of the specified object to a stream.

operator<(STL)

Indicates whether the stored string value of one basic_path object is less than that of another basic_path object.

operator<=(STL)

Indicates whether the stored string value of one basic_path object is less than or equal to that of another basic_path object.

operator>> 연산자

Extracts a string from a basic_istream and assigns it to a Path object.

operator>(STL)

Indicates whether the stored string value of one basic_path object is greater than that of another basic_path object.

operator>=(STL)

Indicates whether the stored string value of one basic_path object is greater than or equal to that of another basic_path object.

operator/(STL)

basic_path 개체의 저장된 파일 이름을 연결합니다.

열거형

Name

설명

copy_option 열거형

copy_file와 사용되고 대상 파일이 이미 있는 경우의 동작을 결정하는 열거형.

file_type 열거형

An enumeration for file types.

참고 항목

기타 리소스

C++ 표준 라이브러리 헤더 파일