close
SFTP または FTP サーバーへの接続を閉じる
構文
説明
例
接続を閉じる
FTP サーバーへの接続を開きます。その後、セッションが終了したときに接続を閉じます。
まず、National Centers for Environmental Information (NCEI、米国環境情報センター) の FTP サーバーに接続します。
s = ftp('ftp.ngdc.noaa.gov')
FTP with properties: Host: "ftp.ngdc.noaa.gov" Username: "anonymous" Port: 21 ServerLocale: "en_US" DirParserFcn: @matlab.io.ftp.parseDirListingForUnix Mode: "binary" LocalDataConnectionMethod: "passive" RemoteWorkingDirectory: "/"
サーバー上の内容を表示して、README.txt
ファイルを取得します。
dir(s)
DMSP coastwatch international INDEX.txt dmsp4alan ionosonde README.txt ftp.html mgg STP geomag pub Snow_Ice google12c4c939d7b90761.html wdc Solid_Earth index.html
mget(s,'README.txt');
FTP サーバーへの接続を閉じます。
close(s)
FTP サービスは National Centers for Environmental Information (NCEI、米国環境情報センター) により提供されています。NCEI の利用規約は、NCEI Privacy Policy, Disclaimer, and Copyright を参照してください。
入力引数
s
— SFTP または FTP サーバーへの接続
SFTP オブジェクト | FTP オブジェクト
SFTP または FTP サーバーへの接続。SFTP オブジェクトまたは FTP オブジェクトとして指定します。
ヒント
セッションの最後に
close
を実行しない場合、接続は、自動的に時間切れになるか、MATLAB® の終了時に切断されます。close
は、成功または失敗を示す出力を返しません。
バージョン履歴
R2006a より前に導入
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)