FTP&QUOT使用;将"命令 [英] Use of FTP "append" command

查看:229
本文介绍了FTP&QUOT使用;将"命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要上传文件到FTP服务器编程(C ++)。如果连接丢失,同时上传文件,我不会想上传从头文件,但只上传我没有送的部分。

I want to upload a file to a ftp server programmatically (C++). If the connection is lost while uploading a file, I wouldn't want to upload the file from scratch, but to upload only the part that I haven't sent.

请问APPE命令满足我的需求呢?什么名单的FTP命令我应该用什么呢?怎么样?

Does the APPE command fulfill my demand? What list of FTP commands should I use exactly? And how?

推荐答案

检查 RFC 并专门追加命令:


  命令使服务器DTP来
  接受经由所述传输的数据
  数据连接,并存储该数据
  在所述服务器站点中的文件。如果
  在路径指定的文件存在
  在服务器站点,则该数据
  应被附加到该文件;
  否则在该文件中指定的
  路径应在创建
  服务器站点。

This command causes the server-DTP to accept the data transferred via the data connection and to store the data in a file at the server site. If the file specified in the pathname exists at the server site, then the data shall be appended to that file; otherwise the file specified in the pathname shall be created at the server site.

请注意,你不能简单地再追加相同的文件。你应该发送剩余的字节数。也就是说,继续当连接丢失相同的位置。

Note that you cannot simply APPEND the same file again. You should send the bytes remaining. That is, continue at the same position when the connection was lost.

这篇关于FTP&QUOT使用;将"命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆