Exemplo n.º 1
0
 public void PutFile(string localFile, string remoteFile)
 {
     if (WININET.FtpPutFile(_hConnect, localFile, remoteFile, 2, IntPtr.Zero) == 0)
     {
         Error();
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Uploads a file to the FTP server
        /// </summary>
        /// <param name="fileName">A <see cref="String"/> representing the local file path to upload.</param>
        /// <param name="localFile">A <see cref="String"/> representing the file path to save the file.</param>
        public void PutFile(string localFile, string remoteFile)
        {
            int ret = WININET.FtpPutFile(_hConnect,
                                         localFile,
                                         remoteFile,
                                         WININET.FTP_TRANSFER_TYPE_BINARY,
                                         IntPtr.Zero);

            if (ret == 0)
            {
                Error();
            }
        }