Gets the modified time of the file
Namespace: System.Net.FtpClient
Assembly: System.Net.FtpClient (in System.Net.FtpClient.dll) Version: 1.0.5064.17461
Syntax
C# |
---|
public virtual DateTime GetModifiedTime(
string path
) |
Visual Basic |
---|
Public Overridable Function GetModifiedTime (
path As String
) As DateTime |
Visual C++ |
---|
public:
virtual DateTime GetModifiedTime(
String^ path
) |
Return Value
Type:
DateTimeThe modified time, DateTime.MinValue if there was a problem
Implements
IFtpClient..::..GetModifiedTime(String)
Examples
C# |
Copy
|
using System;
using System.Net;
using System.Net.FtpClient;
namespace Examples {
static class GetModifiedTimeExample {
public static void GetModifiedTime() {
using (FtpClient conn = new FtpClient()) {
conn.Host = "localhost";
conn.Credentials = new NetworkCredential("ftptest", "ftptest");
Console.WriteLine("The modified type is: {0}",
conn.GetModifiedTime("/full/or/relative/path/to/file"));
}
}
}
}
|
See Also