创建一个 符号字符串 到现有文件。
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
表示现有文件的文件名的 Path 对象。Path 可以是 basic_path 或从 basic_path派生类型。Pval2
包含符号字符串的文件名的 Path 对象。Code
error_code 对象。
返回值
第二个函数返回 Code。
备注
一个 符号字符串 是指向另一个文件系统对象的文件系统对象。
如果符号字符串无法创建,第一个函数引发 basic_filesystem_error。
第二个函数分配给 Code 与操作的所有错误代码。
要求
**标头:**文件系统
**命名空间:**std::tr2::sys