我正在尝试使用{curl}
软件包在我的ftp上创建一个新文件夹
这就是我到目前为止所尝试的:
使用自定义请求设置句柄
library(curl)
h <- curl::new_handle() |>
curl::handle_setopt(customrequest = "MkDir",
username = "my_username",
password = "my_passowrd"
)
字符串
需要创建文件夹test
curl::curl_fetch_memory(url = "ftp://my_ip_address/test/",
handle = h )
型
并显示以下错误
Error in curl::curl_fetch_memory(url = "ftp://my_ip_address/test/", handle = h) :
Failed initialization
型
我甚至尝试了customrequest = "ftp-create-dirs"
和customrequest = "MKD"
错误信息相同
任何指针如何,甚至在哪里阅读更多,将不胜感激
1条答案
按热度按时间hwamh0ep1#
我可以创建一个文件夹,
字符串
自定义请求包含“MKD”命令和您要创建的文件夹的名称。
型
这真的不是一个错误。状态代码“257”只是意味着文件夹已创建,所以忽略该消息是安全的。