Upload file to FTP site using VB.NET

后端 未结 6 1597
夕颜
夕颜 2020-12-09 11:25

I have this working code from this link, to upload a file to an ftp site:

\' set up request...
Dim clsRequest As System.Net.FtpWebRequest = _
    DirectCast(         


        
6条回答
  •  情话喂你
    2020-12-09 12:19

    It is important to know that, Files are just references to pointers that point to an array of bytes in memory.

    When a file writing operation is asked to write a file to a pointer, it will not check if the file exist; Simply, the file system will allow the operation to continue unless the bytes in memory are being used (although you can force overwrite).

    If you want to check if a file exist before writing the file use my GetDirectory method in VB.net here: https://stackoverflow.com/a/28664731/2701974

提交回复
热议问题