[Visual Basic] Public Function FtpDownloadFileToByteArray(ByVal remoteHost As String, ByVal remotePath As String) _ As Byte()
[C#] public byte[] FtpDownloadFileToByteArray(string remoteHost, string remotePath);
パラメータ
- remoteHost
- DNS スタイルのドメイン名、または IP アドレス
- remotePath
- リモート パスの名称
戻り値
成功の場合はデータを格納したバイト配列を、失敗の場合は null (Visual Basic では Nothing)を返します。
解説
FTP プロトコルの場合に有効です。
使用例
[Visual Basic.NET] Dim Data As Byte() 'ユーザ名とパスワード ImageKit.File.FtpCredentials = New NetworkCredential("user", "password") 'パッシブモード接続 ImageKit.File.FtpPassive = True 'ファイルのダウンロード Data = ImageKit.File.FtpDownloadFileToByteArray("www.newtone.co.jp", "test/test.jpg") [Visual C#.NET] byte[] Data; //ユーザ名とパスワード ImageKit.File.FtpCredentials = new NetworkCredential("user", "password"); //パッシブモード接続 ImageKit.File.FtpPassive = true; //ファイルのダウンロード Data = ImageKit.File.FtpDownloadFileToByteArray("www.newtone.co.jp", "test/test.jpg");
参照
ImageKit.File メンバ | Newtone.ImageKit.WPF.ImageKit