다음을 통해 공유


create_symlink 함수

Creates a symbolic link to an existing file.

template<class Path1, class Path2>
inline void create_sym_link(
   const Path1& Pval1,
   const Path2& Pval2
);
template<class Path1, class Path2>
inline error_code create_sym_link(
   const Path1& Pval1,
   const Path2& Pval2,
   error_code& Code
);

매개 변수

  • Pval1
    A Path object that represents the file name of an existing file. Path는 basic_path 또는 basic_path에서 파생된 형식 중 하나일 수 있습니다.

  • Pval2
    A Path object that contains the file name of the symbolic link.

  • Code
    error_code 개체입니다.

반환 값

The second function returns Code.

설명

A symbolic link is a file system object that points to another file system object.

If the symbolic link cannot be created, the first function throws a basic_filesystem_error.

The second function assigns to Code any error code that's associated with the operation.

요구 사항

헤더: filesystem

네임스페이스: std::tr2::sys

참고 항목

참조

<filesystem>

기타 리소스

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