copy_file

copy_file (파일 복사)

copy_file()은 파일의 내용을 다른 위치로 복사해요. 대상 파일이 이미 있는 경우 옵션으로 처리 방법을 정해요.

출처: cppreference

본문

copy_filefrom 파일의 내용을 to 파일로 복사해요. 다른 복사 함수와 달리 파일 내용을 직접 복사해요.

bool copy_file( const std::filesystem::path& from,
                const std::filesystem::path& to );

오류가 발생하면 false를 돌려주는 비던지기 오버로드도 있어요.

반환값 (Return value)

복사가 수행되었으면 true, 아니면 false를 돌려줘요.

더 알아보기 (Learn more)

cppreference