Fixed LastWriteTime

This commit is contained in:
Mark McDowall
2013-09-28 15:25:22 -07:00
parent 82d4933152
commit 88afc19716
2 changed files with 20 additions and 13 deletions

View File

@@ -39,7 +39,7 @@ namespace NzbDrone.Common
string GetPathRoot(string path);
void SetPermissions(string filename, WellKnownSidType accountSid, FileSystemRights rights, AccessControlType controlType);
bool IsParent(string parentPath, string childPath);
void SetFolderAccessTime(string path, DateTime time){
void SetFolderWriteTime(string path, DateTime time);
FileAttributes GetFileAttributes(string path);
void EmptyFolder(string path);
}
@@ -442,6 +442,10 @@ namespace NzbDrone.Common
return false;
}
public void SetFolderWriteTime(string path, DateTime time)
{
Directory.SetLastWriteTimeUtc(path, time);
}
private static void RemoveReadOnly(string path)
{
@@ -452,10 +456,6 @@ namespace NzbDrone.Common
}
}
private void SetFolderAccessTime(string path, DateTime time){
Directory.SetLastWriteTimeUtc(path,time);
}
public FileAttributes GetFileAttributes(string path)
{
return File.GetAttributes(path);