(client-complete-pending-command client)
Complete the previous command and check the reply code. Throw an expection if reply code is not a positive completion
Complete the previous command and check the reply code. Throw an expection if reply code is not a positive completion
(client-get client fname)
(client-get client fname local-name)
Get a file and write to local file-system (must be within a with-ftp)
Get a file and write to local file-system (must be within a with-ftp)
(client-get-stream client fname)
Get a file and return InputStream (must be within a with-ftp). Note that it's necessary to complete
this command with a call to client-complete-pending-command
after using the stream.
Get a file and return InputStream (must be within a with-ftp). Note that it's necessary to complete this command with a call to `client-complete-pending-command` after using the stream.
(client-put client fname)
(client-put client fname remote)
Put a file (must be within a with-ftp)
Put a file (must be within a with-ftp)
(client-put-stream client instream remote)
Put an InputStream (must be within a with-ftp)
Put an InputStream (must be within a with-ftp)
(open url)
(open url control-encoding)
(open url
control-encoding
{:keys [security-mode data-timeout-ms connect-timeout-ms
default-timeout-ms control-keep-alive-timeout-sec
control-keep-alive-reply-timeout-ms]
:or {security-mode :explicit
data-timeout-ms -1
connect-timeout-ms 30000
control-keep-alive-timeout-sec 300
control-keep-alive-reply-timeout-ms 1000}})
(user-info url control-encoding)
Decode the user info part of a URL to extract the username and password.
Note that URI#getUserInfo() isn't used because if the result of that method contains more than one ':' character, we can't determine which ':' is the separator. At the same time, we can't easily use URLDecoder, because it converts '+' into spaces. So we have to do the percent-decoding ourselves.
Decode the user info part of a URL to extract the username and password. Note that URI#getUserInfo() isn't used because if the result of that method contains more than one ':' character, we can't determine which ':' is the separator. At the same time, we can't easily use URLDecoder, because it converts '+' into spaces. So we have to do the percent-decoding ourselves.
(with-ftp [client url &
{:keys [local-data-connection-mode file-type control-encoding]
:as params
:or {control-encoding "UTF-8"}}]
&
body)
Establish an FTP connection, bound to client, for the FTP url, and execute the body with access to that client connection. Closes connection at end of body. Keyword options can follow the url in the binding vector. By default, uses a passive local data connection mode and ASCII file type. Use [client url :local-data-connection-mode :active :file-type :binary :security-mode :explicit] to override.
Allows to override the following timeouts:
connect-timeout-ms
- The timeout used when opening a socket. Default 30000data-timeout-ms
- the underlying socket timeout. Default - infinite (< 1).control-keep-alive-timeout-sec
- control channel keep alive message
timeout. Default 300 seconds.control-keep-alive-reply-timeout-ms
- how long to wait for the control
channel keep alive replies. Default 1000 ms.control-encoding
- The new character encoding for the control connection. Default - UTF-8Establish an FTP connection, bound to client, for the FTP url, and execute the body with access to that client connection. Closes connection at end of body. Keyword options can follow the url in the binding vector. By default, uses a passive local data connection mode and ASCII file type. Use [client url :local-data-connection-mode :active :file-type :binary :security-mode :explicit] to override. Allows to override the following timeouts: - `connect-timeout-ms` - The timeout used when opening a socket. Default 30000 - `data-timeout-ms` - the underlying socket timeout. Default - infinite (< 1). - `control-keep-alive-timeout-sec` - control channel keep alive message timeout. Default 300 seconds. - `control-keep-alive-reply-timeout-ms` - how long to wait for the control channel keep alive replies. Default 1000 ms. - `control-encoding` - The new character encoding for the control connection. Default - UTF-8
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close