Sharpen.FileHelper.SetLastModified C# (CSharp) Method

SetLastModified() public method

public SetLastModified ( FilePath path, long milis ) : bool
path FilePath
milis long
return bool
		public virtual bool SetLastModified(FilePath path, long milis)
		{
			try {
				DateTime utcDateTime = Extensions.MillisToDateTimeOffset(milis, 0L).UtcDateTime;
				if (IsFile(path)) {
					var info2 = new FileInfo(path);
					info2.LastWriteTimeUtc = utcDateTime;
					return true;
				} else if (IsDirectory(path)) {
					var info = new DirectoryInfo(path);
					info.LastWriteTimeUtc = utcDateTime;
					return true;
				}
			} catch  {

			}
			return false;
		}
	}