FTP“附加"的使用命令 [英] Use of FTP "append" command

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

问题描述

我想以编程方式 (C++) 将文件上传到 ftp 服务器.如果上传文件时连接丢失,我不想从头上传文件,而是只上传我没有发送的部分.

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 特别是 APPEND 命令:

Check the RFC and specifically the APPEND command:

这个命令导致服务器-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“附加"的使用命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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