int symlink(const char *name1, const char *name2);
A symbolic link name2 is created to name1 (name2 is the name of the file
created, name1 is the string used in creating the symbolic link). Either
name may be an arbitrary path name; the files need not be on the same
file system.
3条答案
按热度按时间xghobddn1#
您需要的系统调用是symlink(2)。
创建到
name1
的符号链接name2
v8wbuo2f2#
您可以调用
symlink()
p3rjfoxz3#
在C++17中,调用
std::filesystem::create_symlink
。