Name
easy:SetOpt_Chunk_BGN_Function -- callback before a transfer with FTP wildcardmatch
Synopsis
easy:SetOpt_Chunk_BGN_Function(chunk_bgn_callback[, userdata])
Function
Pass a callback function. This callback function gets called by libcurl before a part of the stream is going to be transferred (if the transfer supports chunks).

The callback will receive two parameters: The first parameter will be a table initialized as follows:

Filename:
File name.
Filetype:
File type.
Time:
Timestamp.
Perm:
File permissions.
UID:
File UID.
GID:
File GID.
Size:
File size.
HardLinks:
Hard link flag.
Flags:
Additional flags.
Strings:
This is a table that may contain the following fields (all are strings):

Time:
File time.
Perm:
File permissions.
User:
File user.
Group:
File group.
Target:
File target.

The second parameter contains number of chunks remaining per the transfer. If the feature is not available, the parameter has zero value.

If you pass the optional userdata argument, the value you pass in userdata will be passed to your callback function as a third parameter. The userdata parameter can be of any type.

This callback makes sense only when using the #CURLOPT_WILDCARDMATCH option for now.

Return #CURL_CHUNK_BGN_FUNC_OK if everything is fine, #CURL_CHUNK_BGN_FUNC_SKIP if you want to skip the concrete chunk or #CURL_CHUNK_BGN_FUNC_FAIL to tell libcurl to stop if some error occurred.

Inputs
chunk_bgn_callback
input value
userdata
optional: user data to pass to callback function

Show TOC