如何在 C# 中创建硬链接(hard link)?有代码片段吗?
最佳答案
[DllImport("Kernel32.dll", CharSet = CharSet.Unicode )]
static extern bool CreateHardLink(
string lpFileName,
string lpExistingFileName,
IntPtr lpSecurityAttributes
);
用法:
CreateHardLink(newLinkPath,sourcePath, IntPtr.Zero);
关于c# - 如何在 C# 中创建硬链接(hard link)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3387690/