diff options
author | Gisle Vanem <gisle.vanem@gmail.com> | 2017-12-17 17:26:10 -0500 |
---|---|---|
committer | Jay Satiro <raysatiro@yahoo.com> | 2017-12-26 02:01:48 -0500 |
commit | 859ac3602159ef3df77ac4cb1ae191b069ff1b5b (patch) | |
tree | 80eae8e7fa9d6505c16190422be22c5b8ce324df /docs/cmdline-opts/max-filesize.d | |
parent | b399b04902c43f479b51b142505700edcfc34271 (diff) |
tool_getparam: Support size modifiers for --max-filesize
- Move the size modifier detection code from limit-rate to its own
function so that it can also be used with max-filesize.
Size modifiers are the suffixes such as G (gigabyte), M (megabyte) etc.
For example --max-filesize 1G
Ref: https://curl.haxx.se/mail/archive-2017-12/0000.html
Closes https://github.com/curl/curl/pull/2179
Diffstat (limited to 'docs/cmdline-opts/max-filesize.d')
-rw-r--r-- | docs/cmdline-opts/max-filesize.d | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/cmdline-opts/max-filesize.d b/docs/cmdline-opts/max-filesize.d index e92ef5837..50d5266e1 100644 --- a/docs/cmdline-opts/max-filesize.d +++ b/docs/cmdline-opts/max-filesize.d @@ -7,6 +7,10 @@ Specify the maximum size (in bytes) of a file to download. If the file requested is larger than this value, the transfer will not start and curl will return with exit code 63. +A size modifier may be used. For example, Appending 'k' or 'K' will count the +number as kilobytes, 'm' or 'M' makes it megabytes, while 'g' or 'G' makes it +gigabytes. Examples: 200K, 3m and 1G. (Added in 7.58.0) + \fBNOTE:\fP The file size is not always known prior to download, and for such files this option has no effect even if the file transfer ends up being larger than this given limit. This concerns both FTP and HTTP transfers. |