Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You can use the <a href="http://msdn.microsoft.com/en-us/library/system.io.file_members.aspx" rel="nofollow noreferrer"><code>System.IO.File</code></a> classes static methods to get information you need:</p> <pre><code> DateTime written = File.GetLastWriteTime(fileName); DateTime accessed = File.GetLastAccessTime(fileName); DateTime created = File.GetCreationTime(fileName); </code></pre> <p>This should work for files shared by your linux server via samba too. Also you can run this .Net code with mono on the linux machine - but it seems that not all linux filesystems <a href="https://bugzilla.novell.com/show_bug.cgi?id=425751" rel="nofollow noreferrer">support all of the above methods properly</a>.</p> <p><strong>Update:</strong></p> <p>You could use a ftp and poll that instead of a network share. To access the date time filed you can <a href="http://msdn.microsoft.com/en-us/library/system.net.webrequestmethods.ftp.getdatetimestamp.aspx" rel="nofollow noreferrer">send</a> a ftp-webrequest with <a href="http://msdn.microsoft.com/en-us/library/ms229711.aspx" rel="nofollow noreferrer"><code>WebRequestMethods.Ftp.GetDateTimestamp</code></a> to the server.</p> <p>But maybe I've got your requirements wrong: do you need to check files from one machine on 3 machines? Or should those 3 machines check their files independently from each other? Are the results meant to be gathered by one "service"? Or are the results only relevant to the one machine the file belongs to?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload