globus_ftp_client_data(3)
π NAME π
globus_ftp_client_data β reading and writing data π
okay bestie, quick vibe check: this page lives in the Library Functions Manual for the globus_ftp_client library (that's the section 3 girlies), and it's literally all about reading and writing data. That's it, that's the whole job. β¨
π¦ SYNOPSIS π¦
Typedefs
typedef void(* globus_ftp_client_data_callback_t) (void *user_arg,
globus_ftp_client_handle_t *handle, globus_object_t *error,
globus_byte_t *buffer, globus_size_t length, globus_off_t offset,
globus_bool_t eof)
Functions
globus_result_t globus_ftp_client_register_read
(globus_ftp_client_handle_t *handle, globus_byte_t *buffer,
globus_size_t buffer_length, globus_ftp_client_data_callback_t
callback, void *callback_arg)
globus_result_t globus_ftp_client_register_write
(globus_ftp_client_handle_t *handle, globus_byte_t *buffer,
globus_size_t buffer_length, globus_off_t offset, globus_bool_t eof,
globus_ftp_client_data_callback_t callback, void *callback_arg)
π Detailed Description π
Reading and Writing Data. Yes queen, that's the subtitle and she's serving exactly what she says on the tin. π
So here's the tea π: some FTP client operations literally require you, the user, to hand over buffers so the library can read or write data to an FTP server. No buffer, no transfer, no cap. The operations that need this from you are:
globus_ftp_client_get()globus_ftp_client_partial_get()globus_ftp_client_put()globus_ftp_client_partial_put()globus_ftp_client_list()globus_ftp_client_machine_list()globus_ftp_client_recursive_list()globus_ftp_client_verbose_list()
When you're doing any of those, you must pass data buffers into the FTP Client library. And here's the iconic part: data is read or written directly from the data buffers, with no internal copies being done. Zero. Nada. It's giving efficient. β¨
The functions in this section of the manual may be called as soon as the operation function has returned. You can register multiple data blocks at once with the FTP Client Library, and β if the GridFTP protocol extensions are being used β those blocks may be sent in parallel to or from the FTP server. Parallelism? She ate. π₯
πΈ Typedef Documentation πΈ
typedef void(* globus_ftp_client_data_callback_t) (void *user_arg, globus_ftp_client_handle_t *handle, globus_object_t *error, globus_byte_t *buffer, globus_size_t length, globus_off_t offset, globus_bool_t eof)
Data Callback. π«Ά
Every single read or write operation in the FTP Client library is asynchronous, periodt. So a callback of this type gets passed into each of the data operation function calls, and its whole job is to let you know when the data block has been processed. Your lil messenger pigeon. ποΈ
Parameters:
user_argβ theuser_argparameter you passed to the read or write function. It comes back to you, bestie. πhandleβ the handle on which the data block operation was done.errorβ a Globus error object indicating any problem which occurred processing this data block, orβ¦ orGLOBUS_SUCCESSif the operation completed successfully. (yes the original says "or or", she's a little quirky, we love her π)bufferβ the data buffer passed to the original read or write call.lengthβ the amount of data in the data buffer. Heads up: when reading data, this may be smaller than the original buffer's length. Not a bug, just how she is. πoffsetβ the offset into the file which this data block contains.eofβGLOBUS_TRUEif EOF has been reached on this data transfer,GLOBUS_FALSEotherwise. And plot twist: this may be set toGLOBUS_TRUEfor multiple callbacks. Multiple. Callbacks. π
π Function Documentation π
globus_result_t globus_ftp_client_register_read (globus_ftp_client_handle_t * handle, globus_byte_t * buffer, globus_size_t buffer_length, globus_ftp_client_data_callback_t callback, void * callback_arg)
Register a data buffer to handle a part of the FTP data transfer. π
The data buffer will be associated with the current get being performed on this client handle. That's the whole assignment. π
Parameters:
handleβ a pointer to a FTP Client handle which contains state information about the get operation.bufferβ a user-supplied buffer into which data from the FTP server will be stored.buffer_lengthβ the maximum amount of data that can be stored into the buffer.callbackβ the function to be called once the data has been read.callback_argβ argument passed to the callback function.
See also:
globus_ftp_client_operationattr_set_read_all()
globus_result_t globus_ftp_client_register_write (globus_ftp_client_handle_t * handle, globus_byte_t * buffer, globus_size_t buffer_length, globus_off_t offset, globus_bool_t eof, globus_ftp_client_data_callback_t callback, void * callback_arg)
Register a data buffer to handle a part of the FTP data transfer. π«
This time the data buffer gets associated with the current "put" being performed on this client handle. And you can register multiple data buffers on a handle at once β go off. π
β οΈ But listen: there is no guaranteed ordering of the data callbacks in extended block mode. So don't come for her when they arrive out of order, that's literally documented. π
Parameters:
handleβ a pointer to a FTP Client handle which contains state information about the put operation.bufferβ a user-supplied buffer containing the data to write to the server.buffer_lengthβ the size of the buffer to be written.offsetβ the offset of the buffer to be written. In extended-block mode, the data does not need to be sent in order. In stream mode (the default), data must be sent in sequential order. And the behavior is undefined if multiple writes overlap β so like, don't do that, bestie, that's not a vibe. π«eofβ (the manpage leaves this one blank, no description given, she's mysterious like that π€«)callbackβ the function to be called once the data has been written.callback_argβ argument passed to the callback function.
β¨ Author β¨
Generated automatically by Doxygen for globus_ftp_client from the source code. So technically a robot wrote this and I just did her makeup. π€π
okay that's the whole page, you're officially fluent, go register some buffers and slay πβ¨
This has been your girl, signing off from globus_ftp_client_data(3) β brought to you by globus_ftp_client Version 9.9. πππ¦
π¦ where this page comes from
- epel 10: globus-ftp-client-doc 9.9-1.el10_2 Β· Apache-2.0
- fedora 43: globus-ftp-client-doc 9.9-1.fc43 Β· Apache-2.0
- fedora 44: globus-ftp-client-doc 9.9-2.fc44 Β· Apache-2.0
- ubuntu resolute: libglobus-ftp-client-doc 9.9-1 Β· Apache-2.0
- ubuntu stonking: libglobus-ftp-client-doc 9.9-2build1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms