globus_ftp...operations(3)
๐ globus_ftp...operations(3) ๐
okay bestie, so this is a page straight outta the Library Functions Manual and it's literally called globus_ftp...operations(3). It's a big one, so it comes in 6 parts and this right here is part 1. grab a snack, we're doing this. ๐
๐ธ NAME ๐ธ
globus_ftp_client_operations โ FTP Operations
- FTP Operations.
โจ SYNOPSIS โจ
๐ Typedefs
typedef void(* globus_ftp_client_complete_callback_t) (void *user_arg, globus_ftp_client_handle_t *handle, globus_object_t *error)typedef struct globus_i_ftp_client_features_s * globus_ftp_client_features_tโ Feature Handle. (yes that's its whole job, being a handle for features, iconic honestly)
๐ฎ Enumerations
enum globus_ftp_client_tristate_tenum globus_ftp_client_probed_feature_t
๐ File or Directory Existence
one (1) function. it checks if a thing exists. no notes.
globus_result_t globus_ftp_client_exists (globus_ftp_client_handle_t *u_handle, const char *url, globus_ftp_client_operationattr_t *attr, globus_ftp_client_complete_callback_t complete_callback, void *callback_arg)
๐ Features
the "does this server even do that" squad. init it, destroy it, ask for the feature list, and check if one specific feature is a yes / no / maybe.
globus_result_t globus_ftp_client_features_init (globus_ftp_client_features_t *u_features)
globus_result_t globus_ftp_client_features_destroy (globus_ftp_client_features_t *u_features)
globus_result_t globus_ftp_client_feat (globus_ftp_client_handle_t *u_handle, char *url, globus_ftp_client_operationattr_t *attr, globus_ftp_client_features_t *u_features, globus_ftp_client_complete_callback_t complete_callback, void *callback_arg)
globus_result_t globus_ftp_client_is_feature_supported (const globus_ftp_client_features_t *u_features, globus_ftp_client_tristate_t *answer, globus_ftp_client_probed_feature_t feature)
๐ธ Make Directory
mkdir but make it FTP. periodt.
globus_result_t globus_ftp_client_mkdir (globus_ftp_client_handle_t *u_handle, const char *url, globus_ftp_client_operationattr_t *attr, globus_ftp_client_complete_callback_t complete_callback, void *callback_arg)
๐ฆ Remove Directory
rmdir, the other half of the directory story. ๐
globus_result_t globus_ftp_client_rmdir (globus_ftp_client_handle_t *u_handle, const char *url, globus_ftp_client_operationattr_t *attr, globus_ftp_client_complete_callback_t complete_callback, void *callback_arg)
๐ Change Working Directory
cwd!! and the way that it hands you back a buffer with the directory in it โ cwd_buffer plus its cwd_buffer_length, so you know exactly how big the vibe is.
globus_result_t globus_ftp_client_cwd (globus_ftp_client_handle_t *u_handle, const char *url, globus_ftp_client_operationattr_t *attr, globus_byte_t **cwd_buffer, globus_size_t *cwd_buffer_length, globus_ftp_client_complete_callback_t complete_callback, void *callback_arg)
๐ฅ Delete
yeets a file. that's it, that's the function.
globus_result_t globus_ftp_client_delete (globus_ftp_client_handle_t *u_handle, const char *url, globus_ftp_client_operationattr_t *attr, globus_ftp_client_complete_callback_t complete_callback, void *callback_arg)
๐ง List
two flavours: the regular list, and the verbose_list which is giving main character energy and shows you everything.
globus_result_t globus_ftp_client_list (globus_ftp_client_handle_t *u_handle, const char *url, globus_ftp_client_operationattr_t *attr, globus_ftp_client_complete_callback_t complete_callback, void *callback_arg)
globus_result_t globus_ftp_client_verbose_list (globus_ftp_client_handle_t *u_handle, const char *url, globus_ftp_client_operationattr_t *attr, globus_ftp_client_complete_callback_t complete_callback, void *callback_arg)
โญ STAT
the stat trio: stat (which fills your stat_buffer and stat_buffer_length), plus machine_list and recursive_list hanging out in the same little group.
globus_result_t globus_ftp_client_stat (globus_ftp_client_handle_t *u_handle, const char *url, globus_ftp_client_operationattr_t *attr, globus_byte_t **stat_buffer, globus_size_t *stat_buffer_length, globus_ftp_client_complete_callback_t complete_callback, void *callback_arg)
globus_result_t globus_ftp_client_machine_list (globus_ftp_client_handle_t *u_handle, const char *url, globus_ftp_client_operationattr_t *attr, globus_ftp_client_complete_callback_t complete_callback, void *callback_arg)
globus_result_t globus_ftp_client_recursive_list (globus_ftp_client_handle_t *u_handle, const char *url, globus_ftp_client_operationattr_t *attr, globus_ftp_client_complete_callback_t complete_callback, void *callback_arg)
๐ MLST
one function, one buffer, one length. mlst said "I'll do it myself."
globus_result_t globus_ftp_client_mlst (globus_ftp_client_handle_t *u_handle, const char *url, globus_ftp_client_operationattr_t *attr, globus_byte_t **mlst_buffer, globus_size_t *mlst_buffer_length, globus_ftp_client_complete_callback_t complete_callback, void *callback_arg)
๐ Move
source_url in, dest_url out. glow-up relocation.
globus_result_t globus_ftp_client_move (globus_ftp_client_handle_t *u_handle, const char *source_url, const char *dest_url, globus_ftp_client_operationattr_t *attr, globus_ftp_client_complete_callback_t complete_callback, void *callback_arg)
๐ chmod
permissions era!! you pass an int mode and everything.
globus_result_t globus_ftp_client_chmod (globus_ftp_client_handle_t *u_handle, const char *url, int mode, globus_ftp_client_operationattr_t *attr, globus_ftp_client_complete_callback_t complete_callback, void *callback_arg)
๐ซถ chgrp
same energy as chmod but for the group bestie.
globus_result_t globus_ftp_client_chgrp (globus_ftp_client_handle_t *u_handle, const char *url, const char *group, globus_ftp_client_operationattr_t *attr, globus_ftp_client_complete_callback_t complete_callback, void *callback_arg)
๐ฐ๏ธ utime
set the time, but it takes a const struct tm *utime_time, so bring your struct.
globus_result_t globus_ftp_client_utime (globus_ftp_client_handle_t *u_handle, const char *url, const struct tm *utime_time, globus_ftp_client_operationattr_t *attr, globus_ftp_client_complete_callback_t complete_callback, void *callback_arg)
๐ symlink
make a link from source_url to link_url. iconic behavior.
globus_result_t globus_ftp_client_symlink (globus_ftp_client_handle_t *u_handle, const char *source_url, const char *link_url, globus_ftp_client_operationattr_t *attr, globus_ftp_client_complete_callback_t complete_callback, void *callback_arg)
๐ Get
downloading bestie!! three of them: plain get, partial_get (which takes partial_offset and partial_end_offset so you can grab just a slice), and extended_get (which takes eret_alg_str for the extended retrieve algorithm vibe). all of them take a restart marker.
globus_result_t globus_ftp_client_get (globus_ftp_client_handle_t *handle, const char *url, globus_ftp_client_operationattr_t *attr, globus_ftp_client_restart_marker_t *restart, globus_ftp_client_complete_callback_t complete_callback, void *callback_arg)
globus_result_t globus_ftp_client_partial_get (globus_ftp_client_handle_t *handle, const char *url, globus_ftp_client_operationattr_t *attr, globus_ftp_client_restart_marker_t *restart, globus_off_t partial_offset, globus_off_t partial_end_offset, globus_ftp_client_complete_callback_t complete_callback, void *callback_arg)
globus_result_t globus_ftp_client_extended_get (globus_ftp_client_handle_t *handle, const char *url, globus_ftp_client_operationattr_t *attr, globus_ftp_client_restart_marker_t *restart, const char *eret_alg_str, globus_ftp_client_complete_callback_t complete_callback, void *callback_arg)
๐ฆ Put
uploading era!! put, partial_put (with its partial_offset / partial_end_offset slice), and extended_put (which takes esto_alg_str for the extended store algorithm). also all take a restart marker.
globus_result_t globus_ftp_client_put (globus_ftp_client_handle_t *handle, const char *url, globus_ftp_client_operationattr_t *attr, globus_ftp_client_restart_marker_t *restart, globus_ftp_client_complete_callback_t complete_callback, void *callback_arg)
globus_result_t globus_ftp_client_partial_put (globus_ftp_client_handle_t *handle, const char *url, globus_ftp_client_operationattr_t *attr, globus_ftp_client_restart_marker_t *restart, globus_off_t partial_offset, globus_off_t partial_end_offset, globus_ftp_client_complete_callback_t complete_callback, void *callback_arg)
globus_result_t globus_ftp_client_extended_put (globus_ftp_client_handle_t *handle, const char *url, globus_ftp_client_operationattr_t *attr, globus_ftp_client_restart_marker_t *restart, const char *esto_alg_str, globus_ftp_client_complete_callback_t complete_callback, void *callback_arg)
๐ 3rd Party Transfer
server-to-server, the most dramatic of the transfers. you get source_url, source_attr, dest_url, dest_attr, a restart marker, and a callback. there's also partial_third_party_transfer (with the partial_offset / partial_end_offset slice) and extended_third_party_transfer, which takes BOTH eret_alg_str (on the source side) and esto_alg_str (on the dest side). no cap, it's doing the most and we love it.
globus_result_t globus_ftp_client_third_party_transfer (globus_ftp_client_handle_t *handle, const char *source_url, globus_ftp_client_operationattr_t *source_attr, const char *dest_url, globus_ftp_client_operationattr_t *dest_attr, globus_ftp_client_restart_marker_t *restart, globus_ftp_client_complete_callback_t complete_callback, void *callback_arg)
globus_result_t globus_ftp_client_partial_third_party_transfer (globus_ftp_client_handle_t *handle, const char *source_url, globus_ftp_client_operationattr_t *source_attr, const char *dest_url, globus_ftp_client_operationattr_t *dest_attr, globus_ftp_client_restart_marker_t *restart, globus_off_t partial_offset, globus_off_t partial_end_offset, globus_ftp_client_complete_callback_t complete_callback, void *callback_arg)
globus_result_t globus_ftp_client_extended_third_party_transfer (globus_ftp_client_handle_t *handle, const char *source_url, globus_ftp_client_operationattr_t *source_attr, const char *eret_alg_str, const char *dest_url, globus_ftp_client_operationattr_t *dest_attr, const char *esto_alg_str, globus_ftp_client_restart_marker_t *restart, globus_ftp_client_complete_callback_t complete_callback, void *callback_arg)
โฐ Modification Time
asks the server what time it is for a file, and drops the answer into your globus_abstime_t *modification_time.
globus_result_t globus_ftp_client_modification_time (globus_ftp_client_handle_t *u_handle, const char *url, globus_ftp_client_operationattr_t *attr, globus_abstime_t *modification_time, globus_ftp_client_complete_callback_t complete_callback, void *callback_arg)
๐ Size
how big is it?? now you know. it writes into your globus_off_t *size.
globus_result_t globus_ftp_client_size (globus_ftp_client_handle_t *u_handle, const char *url, globus_ftp_client_operationattr_t *attr, globus_off_t *size, globus_ftp_client_complete_callback_t complete_callback, void *callback_arg)
๐ Cksm
checksum check, the ultimate vibe check for your data. it wants a char *cksm, an offset, a length, and an algorithm.
globus_result_t globus_ftp_client_cksm (globus_ftp_client_handle_t *u_handle, const char *url, globus_ftp_client_operationattr_t *attr, char *cksm, globus_off_t offset, globus_off_t length, const char *algorithm, globus_ftp_client_complete_callback_t complete_callback, void *callback_arg)
๐ Abort
"stop it. get some help." โ takes literally just the handle and nothing else.
globus_result_t globus_ftp_client_abort (globus_ftp_client_handle_t *u_handle)
๐ Detailed Description ๐
FTP Operations.
Initiate an FTP operation.
This module contains the API functions for a user to request a get, put, third-party transfer, or other FTP file operation.
๐ธ Typedef Documentation ๐ธ
๐ globus_ftp_client_complete_callback_t ๐
typedef void(* globus_ftp_client_complete_callback_t) (void *user_arg,
globus_ftp_client_handle_t *handle, globus_object_t *error)
okay bestie, this is the Operation complete callback and she is kind of a big deal. โจ
Every single FTP Client operation โ get, put, transfer, mkdir, etc โ is asynchronous, meaning she does NOT wait around for you. You hand a callback of this type to each operation function call so the library can come tell you when the thing is actually done. ๐
And here's the tea: the completion callback is called only once per operation, and only after all the other callbacks for that operation have already returned. So she's literally the last one to leave the party. ๐
Parameters
user_argโ theuser_argparameter you passed to the operation. She comes right back to you, boo. ๐ซถhandleโ the handle on which the operation was done.errorโ a Globus error object showing any problem that occurred, orGLOBUS_SUCCESSif everything went off without a hitch. ๐
๐ฆ globus_ftp_client_features_t ๐ฆ
typedef struct globus_i_ftp_client_features_s* globus_ftp_client_features_t
Feature Handle. This is the handle used to associate state with feature operations. lowkey iconic. โจ
See also
globus_ftp_client_featglobus_ftp_client_features_initglobus_ftp_client_features_destroy
๐ Enumeration Type Documentation ๐
โญ enum globus_ftp_client_probed_feature_t
Types of features. that's it, that's the description. short and slay. ๐
โญ enum globus_ftp_client_tristate_t
Types for feature existence. Here's the breakdown, no cap:
FALSEandTRUEare known to be fact that a feature does or does not existMAYBEmeans that the feature may exist
๐ Function Documentation ๐
๐ globus_ftp_client_abort
globus_result_t globus_ftp_client_abort (globus_ftp_client_handle_t *
u_handle)
Abort the operation currently in progress. not me hitting the brakes mid-operation, we simply are not doing this anymore. ๐ญ
Parameters
u_handleโ Handle which to abort.
๐ globus_ftp_client_chgrp
globus_result_t globus_ftp_client_chgrp (globus_ftp_client_handle_t *
u_handle, const char * url, const char * group,
globus_ftp_client_operationattr_t * attr,
globus_ftp_client_complete_callback_t complete_callback, void *
callback_arg)
Change group membership on a file. ๐
This function changes file group membership. simple as that.
When the response to the group change request has been received, the complete_callback will be invoked with the result of the operation. ๐ฆ
Parameters
u_handleโ An FTP Client handle to use for the change operation.urlโ The URL of the file to modify group membership.groupโ The group name or numeric identifier for the group that the file should become a member of.attrโ Attributes for this operation.complete_callbackโ Callback to be invoked once the change is completed.callback_argโ Argument to be passed to thecomplete_callback.
Returns
This function returns an error when any of these conditions are true:
handleisGLOBUS_NULLurlisGLOBUS_NULLurlcannot be parsedurlis not a ftp or gsiftp urlcomplete_callbackisGLOBUS_NULLhandlealready has an operation in progress
not her throwing an error because you tried to run two ops on one handle at the same time. one thing at a time bestie, she's not a multitasker. ๐
๐ globus_ftp_client_chmod
globus_result_t globus_ftp_client_chmod (globus_ftp_client_handle_t *
u_handle, const char * url, int mode, globus_ftp_client_operationattr_t
* attr, globus_ftp_client_complete_callback_t complete_callback, void *
callback_arg)
Change permissions on a file. ๐ฅ
This function changes file permissions. (yes the original says "move request" here, we're keeping it exactly, no editing the source material fr fr.)
When the response to the move request has been received the complete_callback will be invoked with the result of the operation.
Parameters
u_handleโ An FTP Client handle to use for the move operation.urlโ The URL of the file to modify permissions.modeโ The integer file mode to change to. Be sure that the integer is in the proper base, i.e.0777(octal) vs777(decimal).attrโ Attributes for this operation.complete_callbackโ Callback to be invoked once the move is completed.callback_argโ Argument to be passed to thecomplete_callback.
Returns
This function returns an error when any of these conditions are true:
handleisGLOBUS_NULLurlisGLOBUS_NULLurlcannot be parsedurlis not a ftp or gsiftp urlcomplete_callbackisGLOBUS_NULLhandlealready has an operation in progress
bestie PLEASE check your base.0777vs777is not a vibe difference, it's an entirely different number and you will be so confused. ๐ญ
๐งฎ globus_ftp_client_cksm
globus_result_t globus_ftp_client_cksm (globus_ftp_client_handle_t *
u_handle, const char * url, globus_ftp_client_operationattr_t * attr,
char * cksm, globus_off_t offset, globus_off_t length, const char *
algorithm, globus_ftp_client_complete_callback_t complete_callback, void
* callback_arg)
Get a file's checksum from an FTP server. โจ
This function requests the checksum of a file from an FTP server.
When the request is completed or aborted, the complete_callback will be invoked with the final status of the operation. If the callback returns without an error, the checksum will be stored in the char * buffer provided in the 'checksum' parameter to this function. The buffer must be large enough to hold the expected checksum result. ๐
Parameters
u_handleโ An FTP Client handle to use for the list operation.urlโ The URL to list. The URL may be an ftp or gsiftp URL.attrโ Attributes for this file transfer.cksmโ A pointer to a buffer to be filled with the checksum of the file. On error the buffer contents are undefined.offsetโ File offset to start calculating checksum.lengthโ Length of data to read from the starting offset. Use-1to read the entire file.algorithmโ A pointer to a string to specifying the desired algorithm. Currently, GridFTP servers only support the MD5 algorithm.complete_callbackโ Callback to be invoked once the checksum is completed.callback_argโ Argument to be passed to thecomplete_callback.
Returns
This function returns an error when any of these conditions are true:
handleisGLOBUS_NULLurlisGLOBUS_NULLurlcannot be parsedurlis not a ftp or gsiftp urlsizeisGLOBUS_NULLcomplete_callbackisGLOBUS_NULLhandlealready has an operation in progress
๐ธ sizing your checksum buffer too small is the classic tragic backstory. don't do it.
๐ globus_ftp_client_cwd
globus_result_t globus_ftp_client_cwd (globus_ftp_client_handle_t *
u_handle, const char * url, globus_ftp_client_operationattr_t * attr,
globus_byte_t ** cwd_buffer, globus_size_t * cwd_buffer_length,
globus_ftp_client_complete_callback_t complete_callback, void *
callback_arg)
Make a directory on an FTP server. (yes the heading says "make a directory" but this is a cwd operation โ the doc is the doc, we're preserving it exactly ๐)
This function starts a cwd operation on a FTP server.
When the response to the cwd request has been received the complete_callback will be invoked with the result of the cwd operation.
Parameters
u_handleโ An FTP Client handle to use for the cwd operation.urlโ The URL for the directory to cd into. The URL may be an ftp or gsiftp URL.attrโ Attributes for this operation.cwd_bufferโ A pointer to aglobus_byte_t *to be allocated and filled with the directory name returned by the CWD, if it succeeds. Otherwise, the value pointed to by it is undefined. It is up the user to free this memory.cwd_buffer_lengthโ A pointer to aglobus_size_tto be filled with the length of the data incwd_buffer.complete_callbackโ Callback to be invoked once the cwd is completed.callback_argโ Argument to be passed to thecomplete_callback.
Returns
This function returns an error when any of these conditions are true:
u_handleisGLOBUS_NULLurlisGLOBUS_NULLurlcannot be parsedurlis not a ftp or gsiftp urlcwd_bufferisGLOBUS_NULLcwd_buffer_lengthisGLOBUS_NULLcomplete_callbackisGLOBUS_NULLhandlealready has an operation in progress
๐ซถ reminder that YOU free cwd_buffer. she allocated it, but the cleanup is on you. the way that memory leaks are literally just forgotten frees... ๐ญ
๐๏ธ globus_ftp_client_delete
globus_result_t globus_ftp_client_delete (globus_ftp_client_handle_t *
u_handle, const char * url, globus_ftp_client_operationattr_t * attr,
globus_ftp_client_complete_callback_t complete_callback, void *
callback_arg)
Delete a file on an FTP server. ๐
This function starts a delete operation on a FTP server. Note that this function will only delete files, not directories. no cap, she does not do folders.
When the response to the delete request has been received the complete_callback will be invoked with the result of the delete operation.
Parameters
u_handleโ An FTP Client handle to use for the delete operation.urlโ The URL for the file to delete. The URL may be an ftp or gsiftp URL.attrโ Attributes for this file transfer.complete_callbackโ Callback to be invoked once the delete is completed.callback_argโ Argument to be passed to thecomplete_callback.
Returns
This function returns an error when any of these conditions are true:
u_handleisGLOBUS_NULLurlisGLOBUS_NULLurlcannot be parsedurlis not a ftp or gsiftp urlcomplete_callbackisGLOBUS_NULLhandlealready has an operation in progress
๐ globus_ftp_client_exists
globus_result_t globus_ftp_client_exists (globus_ftp_client_handle_t *
u_handle, const char * url, globus_ftp_client_operationattr_t * attr,
globus_ftp_client_complete_callback_t complete_callback, void *
callback_arg)
Check for the existence of a file or directory on an FTP server. ๐ฆ
This function attempts to determine whether the specified URL points to a valid file or directory. The complete_callback will be invoked with the result of the existence check passed as a globus error object, or GLOBUS_SUCCESS.
Parameters
u_handleโ An FTP Client handle to use for the existence check operation.urlโ The URL of the directory or file to check. The URL may be an ftp or gsiftp URL.attrโ Attributes to use for this operation.complete_callbackโ Callback to be invoked once the existence operation is completed.callback_argโ Argument to be passed to thecomplete_callback.
Returns
This function returns an error when any of these conditions are true:
u_handleisGLOBUS_NULLurlisGLOBUS_NULLurlcannot be parsedurlis not a ftp or gsiftp urlcomplete_callbackisGLOBUS_NULLhandlealready has an operation in progress
vibe check: she's just asking "does this exist bestie" and reporting back. ๐
๐ globus_ftp_client_extended_get
globus_result_t globus_ftp_client_extended_get (globus_ftp_client_handle_t *
handle, const char * url, globus_ftp_client_operationattr_t * attr,
globus_ftp_client_restart_marker_t * restart, const char * eret_alg_str,
globus_ftp_client_complete_callback_t complete_callback, void *
callback_arg)
Get a file from an FTP server with server-side processing. ๐ฅ๐
This function starts a "get" file transfer from an FTP server. If this function returns GLOBUS_SUCCESS, then the user may immediately begin calling globus_ftp_client_register_read() to retrieve the data associated with this URL.
When all of the data associated with this URL is retrieved, and all of the data callbacks have been called, or if the get request is aborted, the complete_callback will be invoked with the final status of the get.
...and that's where this part wraps, but bestie we are SO not done. more functions incoming, keep scrolling. ๐
So like, the whole point of this one is that it's globus_ftp_client_get() but with spice โ it lets you invoke server-side data processing algorithms. GridFTP servers may support algorithms for data reduction or other customized data storage requirements. Bestie, there is no client-side verification done on the algorithm string you hand over. So if the server does not understand the requested algorithm, the transfer will fail. That's it, that's the deal. ๐
Parameters โจ
handleโ An FTP Client handle to use for the get operation.urlโ The URL to download. The URL may be anftporgsiftpURL.attrโ Attributes for this file transfer.restartโ Pointer to a restart marker.eret_alg_strโ The ERET algorithm string. This string contains information needed to invoke a server-specific data reduction algorithm on the file being retrieved.complete_callbackโ Callback to be invoked once the "get" is completed.callback_argโ Argument to be passed to thecomplete_callback.
Returns ๐ธ
This function returns an error when any of these conditions are true:
handleisGLOBUS_NULLurlisGLOBUS_NULLurlcannot be parsedurlis not aftporgsiftpurlcomplete_callbackisGLOBUS_NULLhandlealready has an operation in progress
See also ๐ฆ
globus_ftp_client_register_read()
globus_ftp_client_extended_put()
globus_result_t globus_ftp_client_extended_put (globus_ftp_client_handle_t *
handle, const char * url, globus_ftp_client_operationattr_t * attr,
globus_ftp_client_restart_marker_t * restart, const char * esto_alg_str,
globus_ftp_client_complete_callback_t complete_callback, void *
callback_arg)
Store a file on an FTP server with server-side processing. ๐
This function starts a "put" file transfer to an FTP server. If this function returns GLOBUS_SUCCESS, then the user may immediately begin calling globus_ftp_client_register_write() to send the data associated with this URL.
When all of the data associated with this URL is sent, and all of the data callbacks have been called, or if the put request is aborted, the complete_callback will be invoked with the final status of the put.
This function differs from the globus_ftp_client_put() function by allowing the user to invoke server-side data processing algorithms. GridFTP servers may support algorithms for data reduction or other customized data storage requirements. There is no client-side verification done on the algorithm string provided by the user. if the server does not understand the requested algorithm, the transfer will fail. ๐ญ
Parameters
handleโ An FTP Client handle to use for the put operation.urlโ The URL to store the data to. The URL may be anftporgsiftpURL.attrโ Attributes for this file transfer.restartโ Pointer to a restart marker.esto_alg_strโ (no description given, bestie, it's just vibes and the parameter name)complete_callbackโ Callback to be invoked once the "put" is completed.callback_argโ Argument to be passed to thecomplete_callback.
See also ๐
globus_ftp_client_register_write()
globus_ftp_client_extended_third_party_transfer()
globus_result_t globus_ftp_client_extended_third_party_transfer
(globus_ftp_client_handle_t * handle, const char * source_url,
globus_ftp_client_operationattr_t * source_attr, const char *
eret_alg_str, const char * dest_url, globus_ftp_client_operationattr_t *
dest_attr, const char * esto_alg_str, globus_ftp_client_restart_marker_t
* restart, globus_ftp_client_complete_callback_t complete_callback, void
* callback_arg)
Transfer a file between two FTP servers with server-side processing. ๐ง
This function starts up a third-party file transfer between FTP server. This function returns immediately.
When the transfer is completed or if the transfer is aborted, the complete_callback will be invoked with the final status of the transfer.
This function differes from the globus_ftp_client_third_party_transfer() function by allowing the user to invoke server-side data processing algorithms. GridFTP servers may support algorithms for data reduction or other customized data storage requirements. There is no client-side verification done on the algorithm string provided by the user. if the server does not understand * the requested algorithm, the transfer will fail. ๐
Parameters
handleโ An FTP Client handle to use for the get operation.source_urlโ The URL to transfer. The URL may be anftporgsiftpURL.source_attrโ Attributes for the source URL.eret_alg_strโ (again, no description, just the name, and we respect that)dest_urlโ The destination URL for the transfer. The URL may be anftporgsiftpURL.dest_attrโ Attributes for the destination URL.esto_alg_strโ (name only, periodt)restartโ Pointer to a restart marker.complete_callbackโ Callback to be invoked once the "put" is completed.callback_argโ Argument to be passed to thecomplete_callback.
Note โ ๏ธ Thesource_attranddest_attrMUST be compatible. For example, theMODEandTYPEshould match for both the source and destination.
globus_ftp_client_feat()
globus_result_t globus_ftp_client_feat (globus_ftp_client_handle_t *
u_handle, char * url, globus_ftp_client_operationattr_t * attr,
globus_ftp_client_features_t * u_features,
globus_ftp_client_complete_callback_t complete_callback, void *
callback_arg)
Check the features supported by the server (FTP FEAT command). ๐ After this procedure completes, the features set (parameter u_features) represents the features supported by the server. Prior to calling this procedure, the structure should have been initialized by globus_ftp_client_features_init(); afterwards, it should be destroyed by globus_ftp_client_features_destroy(). After globus_ftp_client_feat() returns, each feature in the list has one of the values: GLOBUS_FTP_CLIENT_TRUE, GLOBUS_FTP_CLIENT_FALSE, or GLOBUS_FTP_CLIENT_MAYBE. The first two denote the server supporting, or not supporting, the given feature. The last one means that the test has not been performed. This is not necessarily caused by error; there might have been no reason to check for this particular feature. ๐ซถ
Parameters
u_handleโ An FTP Client handle to use for the list operation.urlโ The URL to list. The URL may be anftporgsiftpURL.attrโ Attributes for this file transfer.u_featuresโ A pointer to aglobus_ftp_client_features_tto be filled with the feature set supported by the server.complete_callbackโ Callback to be invoked once the size check is completed.callback_argโ Argument to be passed to thecomplete_callback.
Returns
This function returns an error when any of these conditions are true:
u_handleisGLOBUS_NULLsource_urlisGLOBUS_NULLsource_urlcannot be parsedsource_urlis not aftporgsiftpurlu_featuresisGLOBUS_NULLor badly initializedcomplete_callbackisGLOBUS_NULLhandlealready has an operation in progress
globus_ftp_client_features_destroy()
globus_result_t globus_ftp_client_features_destroy
(globus_ftp_client_features_t * u_features)
Destroy the feature set. ๐
Note The structure passed to this function must have been previously initialized by globus_ftp_client_features_init().
Returns
GLOBUS_SUCCESS on success, otherwise error. โจ
globus_ftp_client_features_init()
globus_result_t globus_ftp_client_features_init
(globus_ftp_client_features_t * u_features)
Initialize the feature set, to be later used by globus_ftp_client_feat(). ๐ธ Each feature gets initial value GLOBUS_FTP_CLIENT_MAYBE.
Note The structure initialized by this function must be destroyed using globus_ftp_client_features_destroy().
Returns
GLOBUS_SUCCESS on success, otherwise error.
globus_ftp_client_get()
globus_result_t globus_ftp_client_get (globus_ftp_client_handle_t * handle,
const char * url, globus_ftp_client_operationattr_t * attr,
globus_ftp_client_restart_marker_t * restart,
globus_ftp_client_complete_callback_t complete_callback, void *
callback_arg)
Get a file from an FTP server. ๐
This function starts a "get" file transfer from an FTP server. If this function returns GLOBUS_SUCCESS, then the user may immediately begin calling globus_ftp_client_register_read() to retrieve the data associated with this URL.
When all of the data associated with this URL is retrieved, and all of the data callbacks have been called, or if the get request is aborted, the complete_callback will be invoked with the final status of the get.
Parameters
handleโ An FTP Client handle to use for the get operation.urlโ The URL to download. The URL may be anftporgsiftpURL.attrโ Attributes for this file transfer.restartโ Pointer to a restart marker.complete_callbackโ Callback to be invoked once the "get" is completed.callback_argโ Argument to be passed to thecomplete_callback.
Returns
This function returns an error when any of these conditions are true:
handleisGLOBUS_NULLurlisGLOBUS_NULLurlcannot be parsedurlis not aftporgsiftpurlcomplete_callbackisGLOBUS_NULLhandlealready has an operation in progress
See also ๐ฆ
globus_ftp_client_register_read()
globus_ftp_client_is_feature_supported()
globus_result_t globus_ftp_client_is_feature_supported (const
globus_ftp_client_features_t * u_features, globus_ftp_client_tristate_t
* answer, globus_ftp_client_probed_feature_t feature)
Check if the feature is supported by the server. ๐ After the function completes, parameter answer contains the state of the server support of the given function. It can have one of the values: GLOBUS_FTP_CLIENT_TRUE, GLOBUS_FTP_CLIENT_FALSE, or GLOBUS_FTP_CLIENT_MAYBE.
Parameters
u_featuresโ list of features, as returned byglobus_ftp_client_feat()answerโ this variable will contain the answerfeatureโ feature number,0 <= feature < GLOBUS_FTP_CLIENT_FEATURE_MAX
Returns
error when any of the parameters is null or badly initialized. ๐ญ
globus_ftp_client_list()
globus_result_t globus_ftp_client_list (globus_ftp_client_handle_t *
u_handle, const char * url, globus_ftp_client_operationattr_t * attr,
globus_ftp_client_complete_callback_t complete_callback, void *
callback_arg)
Get a file listing from an FTP server. ๐
This function starts a "NLST" transfer from an FTP server. If this function returns GLOBUS_SUCCESS, then the user may immediately begin calling globus_ftp_client_register_read() to retrieve the data associated with this listing.
When all of the data associated with the listing is retrieved, and all of the data callbacks have been called, or if the list request is aborted, the complete_callback will be invoked with the final status of the list.
Parameters
u_handleโ the FTP Client handle you're using for this list operation, bestie.urlโ the URL you wanna list. It can be anftpor agsiftpURL, both are valid ๐attrโ attributes for this file transfer.complete_callbackโ the callback that gets invoked once the"list"is done. Periodt.callback_argโ the argument that gets passed along tocomplete_callback.
Returns
She returns an error when any of these are true, no cap:
handleisGLOBUS_NULLurlisGLOBUS_NULLurlcannot be parsedurlis not a ftp or gsiftp urlcomplete_callbackisGLOBUS_NULLhandlealready has an operation in progress ๐ญ one thing at a time, queen
See also
globus_ftp_client_register_read()
globus_ftp_client_machine_list
globus_result_t globus_ftp_client_machine_list (globus_ftp_client_handle_t *
u_handle, const char * url, globus_ftp_client_operationattr_t * attr,
globus_ftp_client_complete_callback_t complete_callback, void *
callback_arg)
Get a machine parseable file listing from an FTP server. โจ
Okay so this one kicks off an "MLSD" transfer from an FTP server. If she returns GLOBUS_SUCCESS, you can immediately start calling globus_ftp_client_register_read() to go grab the data associated with this listing. Like, go, go, go ๐โโ๏ธ
When all the data tied to the listing has been retrieved and all the data callbacks have been called โ or if the list request gets aborted โ the complete_callback gets invoked with the final status of the list. Slay.
Parameters
u_handleโ an FTP Client handle to use for the list operation.urlโ the URL to list. May be anftporgsiftpURL.attrโ attributes for this file transfer.complete_callbackโ callback invoked once the"list"is completed.callback_argโ argument passed to thecomplete_callback.
Returns
An error comes back when any of these are true:
handleisGLOBUS_NULLurlisGLOBUS_NULLurlcannot be parsedurlis not a ftp or gsiftp urlcomplete_callbackisGLOBUS_NULLhandlealready has an operation in progress ๐
See also
globus_ftp_client_register_read()
globus_ftp_client_mkdir
globus_result_t globus_ftp_client_mkdir (globus_ftp_client_handle_t *
u_handle, const char * url, globus_ftp_client_operationattr_t * attr,
globus_ftp_client_complete_callback_t complete_callback, void *
callback_arg)
Make a directory on an FTP server. ๐ manifesting a new folder fr fr
This function starts a mkdir operation on an FTP server.
When the response to the mkdir request has come in, the complete_callback gets invoked with the result of the mkdir operation. ๐ฆ
Parameters
u_handleโ an FTP Client handle to use for the mkdir operation.urlโ the URL for the directory to create. May be anftporgsiftpURL.attrโ attributes for this operation.complete_callbackโ callback invoked once the mkdir is completed.callback_argโ argument passed to thecomplete_callback.
Returns
She returns an error when any of these are true:
u_handleisGLOBUS_NULLurlisGLOBUS_NULLurlcannot be parsedurlis not a ftp or gsiftp urlcomplete_callbackisGLOBUS_NULLhandlealready has an operation in progress ๐ธ
globus_ftp_client_mlst
globus_result_t globus_ftp_client_mlst (globus_ftp_client_handle_t *
u_handle, const char * url, globus_ftp_client_operationattr_t * attr,
globus_byte_t ** mlst_buffer, globus_size_t * mlst_buffer_length,
globus_ftp_client_complete_callback_t complete_callback, void *
callback_arg)
Get information about a file or directory from a FTP server. ๐ฅ the tea, basically
This function requests the MLST fact string of a file or directory from an FTP server.
When the MLST request is completed or aborted, complete_callback gets invoked with the final status of the operation. And if the callback comes back without an error, the MLST fact string gets stored in the globus_byte_t * that the mlst_buffer parameter points to. Iconic.
Parameters
u_handleโ an FTP Client handle to use for the list operation.urlโ the URL of a file or directory to list. May be anftporgsiftpURL.attrโ attributes for this file transfer.mlst_bufferโ a pointer to aglobus_byte_t *that's gonna be allocated and filled with the MLST fact string of the file, if it exists. Otherwise, the value it points to is undefined. ๐ Heads up bestie: it is up to you to free this memory.mlst_buffer_lengthโ a pointer to aglobus_size_tto be filled with the length of the data inmlst_buffer.complete_callbackโ callback invoked once the MLST command is completed.callback_argโ argument passed to thecomplete_callback.
Returns
An error when any of these are true:
handleisGLOBUS_NULLurlisGLOBUS_NULLurlcannot be parsedurlis not a ftp or gsiftp urlmlst_bufferisGLOBUS_NULLmlst_buffer_lengthisGLOBUS_NULLcomplete_callbackisGLOBUS_NULLhandlealready has an operation in progress ๐
globus_ftp_client_modification_time
globus_result_t globus_ftp_client_modification_time
(globus_ftp_client_handle_t * u_handle, const char * url,
globus_ftp_client_operationattr_t * attr, globus_abstime_t *
modification_time, globus_ftp_client_complete_callback_t
complete_callback, void * callback_arg)
Get a file's modification time from an FTP server. โญ when was she last edited?? we must know
This function requests the modification time of a file from an FTP server.
When the modification time request is completed or aborted, complete_callback gets invoked with the final status of the operation. And if the callback comes back without an error, the modification time gets stored in the globus_abstime_t value that the modification_time parameter points to. ๐
Parameters
u_handleโ an FTP Client handle to use for the list operation.urlโ the URL to list. May be anftporgsiftpURL.attrโ attributes for this file transfer.modification_timeโ a pointer to aglobus_abstime_tto be filled with the modification time of the file, if it exists. Otherwise, the value it points to is undefined.complete_callbackโ callback invoked once the modification time check is completed.callback_argโ argument passed to thecomplete_callback.
Returns
Error time when any of these are true:
handleisGLOBUS_NULLurlisGLOBUS_NULLurlcannot be parsedurlis not a ftp or gsiftp url- modification time is
GLOBUS_NULL complete_callbackisGLOBUS_NULLhandlealready has an operation in progress ๐ญ
globus_ftp_client_move
globus_result_t globus_ftp_client_move (globus_ftp_client_handle_t *
u_handle, const char * source_url, const char * dest_url,
globus_ftp_client_operationattr_t * attr,
globus_ftp_client_complete_callback_t complete_callback, void *
callback_arg)
Move a file on an FTP server. ๐ relocation era
This function starts a move (rename) operation on an FTP server. But listen โ this function does not move files between FTP servers, and the host:port part of the destination url is ignored. Don't be surprised, I told you ๐
When the response to the move request has been received, the complete_callback gets invoked with the result of the move operation.
Parameters
u_handleโ an FTP Client handle to use for the move operation.source_urlโ the URL for the file to move.dest_urlโ the URL for the target of the move. Thehost:portpart of this URL is ignored.attrโ attributes for this operation.complete_callbackโ callback invoked once the move is completed.callback_argโ argument passed to thecomplete_callback.
Returns
An error when any of these are true:
handleisGLOBUS_NULLsource_urlisGLOBUS_NULLsource_urlcannot be parsedsource_urlis not a ftp or gsiftp urlcomplete_callbackisGLOBUS_NULLhandlealready has an operation in progress ๐ซถ
globus_ftp_client_partial_get
globus_result_t globus_ftp_client_partial_get (globus_ftp_client_handle_t *
handle, const char * url, globus_ftp_client_operationattr_t * attr,
globus_ftp_client_restart_marker_t * restart, globus_off_t
partial_offset, globus_off_t partial_end_offset,
globus_ftp_client_complete_callback_t complete_callback, void *
callback_arg)
Get a file from an FTP server. ๐ but, like, a slice of it
This function starts a "get" file transfer from an FTP server. If it returns GLOBUS_SUCCESS, you can immediately start calling globus_ftp_client_register_read() to retrieve the data associated with this URL. Go off ๐ซ
When all of the data associated with this URL is retrieved, and all of the data callbacks have been called โ or if the get request is aborted โ the complete_callback gets invoked with the final status of the get.
Parameters
handleโ an FTP Client handle to use for the get operation.urlโ the URL to download. May be anftporgsiftpURL.attrโ attributes for this file transfer.restartโ pointer to a restart marker.partial_offsetโ starting offset for a partial file get.partial_end_offsetโ ending offset for a partial file get. Use-1for EOF.complete_callbackโ callback invoked once the"get"is completed.callback_argโ argument passed to thecomplete_callback.
Returns
An error when any of these are true:
handleisGLOBUS_NULLurlisGLOBUS_NULLurlcannot be parsedurlis not a ftp or gsiftp urlcomplete_callbackisGLOBUS_NULLhandlealready has an operation in progress ๐
globus_ftp_client_partial_put
globus_result_t globus_ftp_client_partial_put (globus_ftp_client_handle_t *
handle, const char * url, globus_ftp_client_operationattr_t * attr,
globus_ftp_client_restart_marker_t * restart, globus_off_t
partial_offset, globus_off_t partial_end_offset,
globus_ftp_client_complete_callback_t complete_callback, void *
callback_arg)
Store a file on an FTP server. ๐ upload szn, but make it partial
This function starts a "put" file transfer to an FTP server. If it returns GLOBUS_SUCCESS, you may immediately begin calling globus_ftp_client_register_write() to send the data associated with this URL. Yes bestie, right away โจ
When all of the data associated with this URL is sent, and all of the data callbacks have been called โ or if the put request is aborted โ the complete_callback gets invoked with the final status of the put.
Parameters
handleโ an FTP Client handle to use for the put operation.urlโ the URL to upload. May be anftporgsiftpURL.attrโ attributes for this file transfer.restartโ pointer to a restart marker.partial_offsetโ starting offset for a partial file put.partial_end_offsetโ ending offset for a partial file put. Use-1for EOF.complete_callbackโ callback invoked once the"put"is completed.callback_argโ argument passed to thecomplete_callback.handleโ the FTP Client handle you're doing this put with ๐ซถurlโ where the data goes. Can be anftporgsiftpURL, bestie.attrโ attributes for this file transfer โจrestartโ pointer to a restart marker ๐partial_offsetโ starting offset for a partial file putpartial_end_offsetโ ending offset for a partial file putcomplete_callbackโ callback that gets invoked once the "put" is completed ๐callback_argโ argument passed along to thecomplete_callback
See also
globus_ftp_client_register_write()
๐ฆ globus_ftp_client_partial_third_party_transfer
globus_result_t globus_ftp_client_partial_third_party_transfer
(globus_ftp_client_handle_t * handle, const char * source_url,
globus_ftp_client_operationattr_t * source_attr, const char * dest_url,
globus_ftp_client_operationattr_t * dest_attr,
globus_ftp_client_restart_marker_t * restart, globus_off_t
partial_offset, globus_off_t partial_end_offset,
globus_ftp_client_complete_callback_t complete_callback, void *
callback_arg)
Transfer a file between two FTP servers. ๐
This one kicks off a third-party file transfer between FTP servers, and then it returns immediately โ like, it does not wait around, it has places to be ๐
When the transfer finishes, or if it gets aborted, the complete_callback gets invoked with the final status of the transfer. No cap.
Parameters
handleโ the FTP Client handle to use for the get operation.source_urlโ the URL to transfer. May be anftporgsiftpURL.source_attrโ attributes for the source URL.dest_urlโ the destination URL for the transfer. May be anftporgsiftpURL.dest_attrโ attributes for the destination URL.restartโ pointer to a restart marker.partial_offsetโ starting offset for a partial file get.partial_end_offsetโ ending offset for a partial file get. Use-1for EOF.complete_callbackโ callback invoked once the "put" is completed.callback_argโ argument to be passed to thecomplete_callback.
๐จ Note: thesource_attranddest_attrMUST be compatible. Like, for example, theMODEandTYPEshould match for both the source and the destination. If they don't match, that's not it. ๐
๐ธ globus_ftp_client_put
globus_result_t globus_ftp_client_put (globus_ftp_client_handle_t * handle,
const char * url, globus_ftp_client_operationattr_t * attr,
globus_ftp_client_restart_marker_t * restart,
globus_ftp_client_complete_callback_t complete_callback, void *
callback_arg)
Store a file on an FTP server. ๐ค
This starts a "put" file transfer to an FTP server. If it returns GLOBUS_SUCCESS, then bestie, you may immediately start calling globus_ftp_client_register_write() to send the data associated with this URL. Go off. โจ
When all the data associated with this URL is sent, and all the data callbacks have been called, or if the put request is aborted, the complete_callback will be invoked with the final status of the put. Periodt.
Parameters
handleโ the FTP Client handle to use for the put operation.urlโ the URL to store the data to. May be anftporgsiftpURL.attrโ attributes for this file transfer.restartโ pointer to a restart marker.complete_callbackโ callback to be invoked once the "put" is completed.callback_argโ argument to be passed to thecomplete_callback.
See also
globus_ftp_client_register_write()
๐ globus_ftp_client_recursive_list
globus_result_t globus_ftp_client_recursive_list (globus_ftp_client_handle_t
* u_handle, const char * url, globus_ftp_client_operationattr_t * attr,
globus_ftp_client_complete_callback_t complete_callback, void *
callback_arg)
Get a machine parseable recursive file listing from an FTP server. ๐๏ธ
This starts an "MLSR" transfer from an FTP server. If it returns GLOBUS_SUCCESS, you may immediately begin calling globus_ftp_client_register_read() to retrieve the data associated with this listing. Iconic.
When all the data associated with the listing is retrieved, and all the data callbacks have been called, or if the list request is aborted, the complete_callback will be invoked with the final status of the list.
Parameters
u_handleโ the FTP Client handle to use for the list operation.urlโ the URL to list. May be anftporgsiftpURL.attrโ attributes for this file transfer.complete_callbackโ callback to be invoked once the "list" is completed.callback_argโ argument to be passed to thecomplete_callback.
Returns
This function returns an error when any of these conditions are true, and every single one of them counts:
handleisGLOBUS_NULLurlisGLOBUS_NULLurlcannot be parsedurlis not aftporgsiftpurlcomplete_callbackisGLOBUS_NULLhandlealready has an operation in progress
See also
globus_ftp_client_register_read()
๐ globus_ftp_client_rmdir
globus_result_t globus_ftp_client_rmdir (globus_ftp_client_handle_t *
u_handle, const char * url, globus_ftp_client_operationattr_t * attr,
globus_ftp_client_complete_callback_t complete_callback, void *
callback_arg)
Make a directory on an FTP server. ๐
This starts a rmdir operation on a FTP server. (Yes, the description says "Make a directory" โ we're just telling you exactly what the page says, bestie ๐)
When the response to the rmdir request has been received, the complete_callback will be invoked with the result of the rmdir operation.
Parameters
u_handleโ the FTP Client handle to use for the rmdir operation.urlโ the URL for the directory to create. May be anftporgsiftpURL.attrโ attributes for this operation.complete_callbackโ callback to be invoked once the rmdir is completed.callback_argโ argument to be passed to thecomplete_callback.
Returns
This function returns an error when any of these conditions are true:
u_handleisGLOBUS_NULLurlisGLOBUS_NULLurlcannot be parsedurlis not aftporgsiftpurlcomplete_callbackisGLOBUS_NULLhandlealready has an operation in progress
๐ง globus_ftp_client_size
globus_result_t globus_ftp_client_size (globus_ftp_client_handle_t *
u_handle, const char * url, globus_ftp_client_operationattr_t * attr,
globus_off_t * size, globus_ftp_client_complete_callback_t
complete_callback, void * callback_arg)
Get a file's size from an FTP server. ๐
This requests the size of a file from an FTP server. Very demure, very mindful.
When the size request is completed or aborted, the complete_callback will be invoked with the final status of the operation. If the callback returns without an error, the size will be stored in the globus_off_t value pointed to by the size parameter of this function.
๐จ Note: in ASCII mode, the size will be the size of the file after conversion to ASCII mode. The actual amount of data returned in the data callbacks may be less than this amount. So don't come for us if the numbers don't match up ๐
Parameters
u_handleโ the FTP Client handle to use for the list operation.urlโ the URL to list. May be anftporgsiftpURL.attrโ attributes for this file transfer.sizeโ a pointer to aglobus_off_tto be filled with the total size of the file, if it exists. Otherwise, the value pointed to by it is undefined.complete_callbackโ callback to be invoked once the size check is completed.callback_argโ argument to be passed to thecomplete_callback.
Returns
This function returns an error when any of these conditions are true:
handleisGLOBUS_NULLurlisGLOBUS_NULLurlcannot be parsedurlis not aftporgsiftpurlsizeisGLOBUS_NULLcomplete_callbackisGLOBUS_NULLhandlealready has an operation in progress
โญ globus_ftp_client_stat
globus_result_t globus_ftp_client_stat (globus_ftp_client_handle_t *
u_handle, const char * url, globus_ftp_client_operationattr_t * attr,
globus_byte_t ** stat_buffer, globus_size_t * stat_buffer_length,
globus_ftp_client_complete_callback_t complete_callback, void *
callback_arg)
Get information about a file or directory from a FTP server. ๐
This requests the STAT listing of a file or directory from an FTP server.
When the STAT request is completed or aborted, the complete_callback will be invoked with the final status of the operation. If the callback returns without an error, the STAT fact string will be stored in the globus_byte_t * pointed to by the stat_buffer parameter of this function.
Parameters
u_handleโ the FTP Client handle to use for the list operation.urlโ the URL of a file or directory to list. May be anftporgsiftpURL.attrโ attributes for this file transfer.stat_bufferโ a pointer to aglobus_byte_t *to be allocated and filled with theSTATlisting of the file, if it exists. Otherwise, the value pointed to by it is undefined. It is up to you, the user, to free this memory. Yes, you. Don't forget. ๐ซถstat_buffer_lengthโ a pointer to aglobus_size_tto be filled with the length of the data instat_buffer.complete_callbackโ callback to be invoked once theSTATcommand is completed.callback_argโ argument to be passed to thecomplete_callback.
Returns
This function returns an error when any of these conditions are true:
handleisGLOBUS_NULLurlisGLOBUS_NULLurlcannot be parsedurlis not aftporgsiftpurlstat_bufferisGLOBUS_NULLstat_buffer_lengthisGLOBUS_NULLcomplete_callbackisGLOBUS_NULLhandlealready has an operation in progress
๐ globus_ftp_client_symlink
globus_result_t globus_ftp_client_symlink (globus_ftp_client_handle_t *
u_handle, const char * source_url, const char * link_url,
globus_ftp_client_operationattr_t * attr,
globus_ftp_client_complete_callback_t complete_callback, void *
callback_arg)
Create a symbolic link on the FTP server. ๐
This creates a symbolic link on the FTP server pointing to a given path. Heads up though: this function does not link files between FTP servers, and the host:port part of the link url is ignored. Lowkey important, don't skip that part.
When the response to the symlink request has been received, the complete_callback will be invoked with the result of the move operation.
Parameters
u_handleโ the FTP Client handle to use for the move operation.source_urlโ the URL for the symbolic link to create.link_urlโ the URL for the target of the link. Thehost:portpart of this URL is ignored.attrโ attributes for this operation.complete_callbackโ callback to be invoked once the symlink is completed.callback_argโ argument to be passed to thecomplete_callback.
Returns
This function returns an error when any of these conditions are true:
handleisGLOBUS_NULLsource_urlisGLOBUS_NULLsource_urlcannot be parsedsource_urlis not aftporgsiftpurlcomplete_callbackisGLOBUS_NULLhandlealready has an operation in progress
๐
globus_result_t globus_ftp_client_third_party_transfer
(globus_ftp_client_handle_t * handle, const char * source_url,
globus_ftp_client_operationattr_t * source_attr, const char * dest_url,
globus_ftp_client_operationattr_t * dest_attr,
globus_ftp_client_restart_marker_t * restart,
globus_ftp_client_complete_callback_t complete_callback, void *
callback_arg)
Transfer a file between two FTP servers. ๐ฆ
okay bestie, this is the iconic one โ it kicks off a third-party file transfer between FTP server. and the moment you call it? it returns immediately. like, it does not wait, it does not text back, it is gone โจ
when the transfer is completed, or if the transfer is aborted, the complete_callback gets invoked with the final status of the transfer. so that's your notification, that's your "hey girl it's done" ๐
Parameters
handleโ An FTP Client handle to use for the get operation.source_urlโ The URL to transfer. The URL may be anftporgsiftpURL.source_attrโ Attributes for the source URL.dest_urlโ The destination URL for the transfer. The URL may be anftporgsiftpURL.dest_attrโ Attributes for the destination URL.restartโ Pointer to a restart marker.complete_callbackโ Callback to be invoked once the"put"is completed.callback_argโ Argument to be passed to thecomplete_callback.
Note ๐ โ thesource_attranddest_attrMUST be compatible. For example, theMODEandTYPEshould match for both the source and destination. no cap, they have to match, it's giving "couples costume or nothing" ๐ซถ
๐ธ globus_result_t globus_ftp_client_utime
(globus_ftp_client_handle_t * u_handle, const char * url,
const struct tm * utime_time,
globus_ftp_client_operationattr_t * attr,
globus_ftp_client_complete_callback_t complete_callback, void *
callback_arg)
Set the modification time on a file. โฐโจ
This function changes file modification time. that's it, that's the whole vibe โ you're telling a file "bestie, your timestamp is this now" ๐
When the response to the modification time request has been received the complete_callback will be invoked with the result of the operation. ๐
Parameters
u_handleโ An FTP Client handle to use for the change operation.urlโ The URL of the file to modify group membership.utime_timeโ The absolute time to which the file's modification time should be set.attrโ Attributes for this operation.complete_callbackโ Callback to be invoked once the change is completed.callback_argโ Argument to be passed to thecomplete_callback.
Returns โ This function returns an error when any of these conditions are true:
handleisGLOBUS_NULLurlisGLOBUS_NULLurlcannot be parsedurlis not aftporgsiftpurlcomplete_callbackisGLOBUS_NULLhandlealready has an operation in progress
๐ง globus_result_t globus_ftp_client_verbose_list
(globus_ftp_client_handle_t * u_handle, const char * url,
globus_ftp_client_operationattr_t * attr,
globus_ftp_client_complete_callback_t complete_callback, void *
callback_arg)
Get a file listing from an FTP server. ๐๐
This function starts a "LIST" transfer from an FTP server. and here's the little detail that matters: if this function returns GLOBUS_SUCCESS, then the user may immediately begin calling globus_ftp_client_register_read() to retrieve the data associated with this listing. immediately bestie, don't wait, go get it ๐โโ๏ธ๐จ
When all of the data associated with the listing is retrieved, and all of the data callbacks have been called, or if the list request is aborted, the complete_callback will be invoked with the final status of the list. ๐ฆ
Parameters
u_handleโ An FTP Client handle to use for the list operation.urlโ The URL to list. The URL may be anftporgsiftpURL.attrโ Attributes for this file transfer.complete_callbackโ Callback to be invoked once the"list"is completed.callback_argโ Argument to be passed to thecomplete_callback.
Returns โ This function returns an error when any of these conditions are true:
handleisGLOBUS_NULLurlisGLOBUS_NULLurlcannot be parsedurlis not aftporgsiftpurlcomplete_callbackisGLOBUS_NULLhandlealready has an operation in progress
See also
globus_ftp_client_register_read()
๐ AUTHOR
Generated automatically by Doxygen for globus_ftp_client from the source code. ๐คโจ (yes she was born in a doc generator and she's still serving)
and that's a wrap on part 6, bestie ๐ the whole globus_ftp_client saga โ Version 9.9, straight from the source globus_ftp_client manual, globus_ftp...operations(3) โ is officially finished. you read the whole thing, that's main character energy fr fr ๐ slay, go write some FTP code, i'm obsessed with you ๐ซถ๐ธ
๐ฆ 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