aboutsummaryrefslogtreecommitdiffstats
path: root/src/bindings
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-09-19 00:55:49 +0200
committerbptato <nincsnevem662@gmail.com>2023-09-19 01:02:53 +0200
commit50932ee701f0cb9454b145dec775ada3670ea768 (patch)
treeb91aa01d713b7b04c33f04a62f946354365a6c02 /src/bindings
parent8a826ba92b7c744a995a9593834d63acd6d040b3 (diff)
downloadchawan-50932ee701f0cb9454b145dec775ada3670ea768.tar.gz
loader: add FTP support
works, sort of still needs some work: * better dirlist, ideally make it look like file dirlist (or make file look like ftp dirlist. well, anyway, they should look the same) * absolute paths? (for now you have to append an extra slash to the path beginning) * ssh keys for sftp? (actually I haven't even tested sftp yet...)
Diffstat (limited to 'src/bindings')
-rw-r--r--src/bindings/curl.nim8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/bindings/curl.nim b/src/bindings/curl.nim
index bab180f5..825ab656 100644
--- a/src/bindings/curl.nim
+++ b/src/bindings/curl.nim
@@ -79,9 +79,11 @@ type
CURLOPT_SSLVERSION = CURLOPTTYPE_VALUES + 32
CURLOPT_TIMECONDITION = CURLOPTTYPE_VALUES + 33
CURLOPT_POST = CURLOPTTYPE_LONG + 47
+ CURLOPT_DIRLISTONLY = CURLOPTTYPE_LONG + 48
CURLOPT_FOLLOWLOCATION = CURLOPTTYPE_LONG + 52
CURLOPT_POSTFIELDSIZE = CURLOPTTYPE_LONG + 60
CURLOPT_HTTPGET = CURLOPTTYPE_LONG + 80
+ CURLOPT_FTP_FILEMETHOD = CURLOPTTYPE_VALUES + 138
CURLOPT_CONNECT_ONLY = CURLOPTTYPE_LONG + 141
# Objectpoint
@@ -265,6 +267,12 @@ type
CURLE_UNRECOVERABLE_POLL, # 99 - poll/select returned fatal error
CURL_LAST # never use!
+ curl_ftpmethod* {.size: sizeof(cint).} = enum
+ CURLFTPMETHOD_DEFAULT, # let libcurl pick
+ CURLFTPMETHOD_MULTICWD, # single CWD operation for each path part
+ CURLFTPMETHOD_NOCWD, # no CWD at all
+ CURLFTPMETHOD_SINGLECWD, # one CWD to full dir, then work on file
+
CURLMcode* {.size: sizeof(cint).} = enum
CURLM_CALL_MULTI_PERFORM = -1, # please call curl_multi_perform() or
# curl_multi_socket*() soon