Mercurial > servermonitor
comparison ServerMonitor/Objects/Checks/FileCheck.cs @ 31:88ca7e4fc023
Allow running a file check on a directory.
author | Brad Greco <brad@bgreco.net> |
---|---|
date | Sun, 16 Jun 2019 16:54:46 -0400 |
parents | 68d7834dc28e |
children |
comparison
equal
deleted
inserted
replaced
30:b0af6b4bed4d | 31:88ca7e4fc023 |
---|---|
21 { | 21 { |
22 // Invert because POSIX says so. | 22 // Invert because POSIX says so. |
23 int timeZoneOffset = TimeZoneInfo.Local.GetUtcOffset(DateTime.Now).Hours * -1; | 23 int timeZoneOffset = TimeZoneInfo.Local.GetUtcOffset(DateTime.Now).Hours * -1; |
24 // Set the date format to long-iso since it's easy to parse. | 24 // Set the date format to long-iso since it's easy to parse. |
25 // Set the time zone to the match the client time zone so comparisons are reliable. | 25 // Set the time zone to the match the client time zone so comparisons are reliable. |
26 return "export TIME_STYLE=long-iso; export TZ=UTC" + timeZoneOffset + "; ls -l \"{0}\""; | 26 return "export TIME_STYLE=long-iso; export TZ=UTC" + timeZoneOffset + "; ls -ld \"{0}\""; |
27 } | 27 } |
28 } | 28 } |
29 | 29 |
30 /// <summary>The path of the file to check.</summary> | 30 /// <summary>The path of the file to check.</summary> |
31 public string File { get; set; } | 31 public string File { get; set; } |