FtpWebResponse.StatusDescription プロパティ
アセンブリ: System (system.dll 内)
構文この応答で返されたステータス コードとメッセージを格納している String インスタンス。
解説StatusDescription プロパティが返すテキストには、3 桁の StatusCode プロパティ値が含まれます。データのダウンロード中は、FTP サーバーからステータス コードが返されるにつれて、StatusDescription の値が変わります。GetResponse メソッドを呼び出すと、StatusDescription には中間ステータス コードが格納されます。Close メソッドを呼び出すと、StatusDescription には最終的なステータスが格納されます。
使用例FTP サーバー上のファイルを削除する要求を送信し、要求に対するサーバーの応答からステータス メッセージを表示するコード例を次に示します。
public static bool DeleteFileOnServer(Uri serverUri) { // The serverUri parameter should use the ftp:// scheme. // It contains the name of the server file that is to be deleted. // Example: ftp://contoso.com/someFile.txt. // 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.DeleteFile; FtpWebResponse response = (FtpWebResponse) request.GetResponse(); Console.WriteLine("Delete status: {0}",response.StatusDescription); response.Close(); 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.StatusDescription プロパティを検索する場合は、下記のリンクをクリックしてください。
全ての辞書からFtpWebResponse.StatusDescription プロパティ
を検索
- FtpWebResponse.StatusDescription プロパティのページへのリンク