Setting an NTFS junction point's created/modified datetime?

时间:2017-11-14 23:49:15

标签: c# .net datetime ntfs

With normal files and directories, it's relatively easy to set their created and modified datetime in .NET. Just create a DirectoryInfo for that path and set CreationTimeUtc and LastWriteTimeUtc to what you want. However, when you create a DirectoryInfo for a junction point and set these properties, it resolves the junction point to its target and sets the target instead. Oddly, when you read the properties, they in fact show the created/modified datetime of the junction point itself.

How can I set the junction point's datetimes?

0 个答案:

没有答案