开发者

Is there a touch() for .NET/windows? can use while file is readlocked? [duplicate]

This question already has answers here: Closed 10 years ago.

Possible Duplicate:

How to touch a file in C#?

Is there a开发者_如何学C touch() function available? I would like to update the timestamp so my script doesnt delete the file when it becomes X old. Another issue is it should work when the file is locked for reading by another process.


You might want to look into the FileInfo class. You can set LastWriteTime, LastAccessTime etc from there.

If the file is locked, you may run into a problem, but it's amazing what you CAN do to a locked file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜