FtpWebResponse.LastModified プロパティ
アセンブリ: System (system.dll 内)

public DateTime LastModified { get; }
ファイルが最後に変更された日時を格納している DateTime。

LastModified プロパティは、GetDateTimeStamp メソッドが要求したデータを返します。その他のメソッドを使用して送信された要求の場合、LastModified は MinValue を返します。

FTP サーバー上のファイルが最後に変更された日時を表示するコード例を次に示します。
public static bool GetDateTimestampOnServer (Uri serverUri) { // The serverUri should start with the ftp:// scheme. if (serverUri.Scheme != Uri.UriSchemeFtp) { return false; } // Get the object used to communicate with the server. FtpWebRequest request = (FtpWebRequest)WebRequest.Create (serverUri); request.Method = WebRequestMethods.Ftp.GetDateTimestamp; FtpWebResponse response = (FtpWebResponse)request.GetResponse (); Console.WriteLine ("{0} {1}",serverUri,response.LastModified); // The output from this method will vary depending on the // file specified and your regional settings. It is similar to: // ftp://contoso.com/Data.txt 4/15/2003 10:46:02 AM return true; }

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からFtpWebResponse.LastModified プロパティを検索する場合は、下記のリンクをクリックしてください。

- FtpWebResponse.LastModified プロパティのページへのリンク