globus_ftp...operations(3)

๐Ÿ“ฆ
version 9.9 ยท 6 versions
, in epel 10, fedora 43, fedora 44, ubuntu resolute, ubuntu stonking

๐Ÿ’… 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_t
  • enum 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)

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 โ€” the user_arg parameter 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, or GLOBUS_SUCCESS if 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_feat
  • globus_ftp_client_features_init
  • globus_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:

  • FALSE and TRUE are known to be fact that a feature does or does not exist
  • MAYBE means 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 the complete_callback.

Returns

This function returns an error when any of these conditions are true:

  • handle is GLOBUS_NULL
  • url is GLOBUS_NULL
  • url cannot be parsed
  • url is not a ftp or gsiftp url
  • complete_callback is GLOBUS_NULL
  • handle already 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) vs 777 (decimal).
  • attr โ€” Attributes for this operation.
  • complete_callback โ€” Callback to be invoked once the move is completed.
  • callback_arg โ€” Argument to be passed to the complete_callback.

Returns

This function returns an error when any of these conditions are true:

  • handle is GLOBUS_NULL
  • url is GLOBUS_NULL
  • url cannot be parsed
  • url is not a ftp or gsiftp url
  • complete_callback is GLOBUS_NULL
  • handle already has an operation in progress
bestie PLEASE check your base. 0777 vs 777 is 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 -1 to 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 the complete_callback.

Returns

This function returns an error when any of these conditions are true:

  • handle is GLOBUS_NULL
  • url is GLOBUS_NULL
  • url cannot be parsed
  • url is not a ftp or gsiftp url
  • size is GLOBUS_NULL
  • complete_callback is GLOBUS_NULL
  • handle already 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 a globus_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 a globus_size_t to be filled with the length of the data in cwd_buffer.
  • complete_callback โ€” Callback to be invoked once the cwd is completed.
  • callback_arg โ€” Argument to be passed to the complete_callback.

Returns

This function returns an error when any of these conditions are true:

  • u_handle is GLOBUS_NULL
  • url is GLOBUS_NULL
  • url cannot be parsed
  • url is not a ftp or gsiftp url
  • cwd_buffer is GLOBUS_NULL
  • cwd_buffer_length is GLOBUS_NULL
  • complete_callback is GLOBUS_NULL
  • handle already 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 the complete_callback.

Returns

This function returns an error when any of these conditions are true:

  • u_handle is GLOBUS_NULL
  • url is GLOBUS_NULL
  • url cannot be parsed
  • url is not a ftp or gsiftp url
  • complete_callback is GLOBUS_NULL
  • handle already 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 the complete_callback.

Returns

This function returns an error when any of these conditions are true:

  • u_handle is GLOBUS_NULL
  • url is GLOBUS_NULL
  • url cannot be parsed
  • url is not a ftp or gsiftp url
  • complete_callback is GLOBUS_NULL
  • handle already 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 an ftp or gsiftp URL.
  • 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 the complete_callback.

Returns ๐ŸŒธ

This function returns an error when any of these conditions are true:

  • handle is GLOBUS_NULL
  • url is GLOBUS_NULL
  • url cannot be parsed
  • url is not a ftp or gsiftp url
  • complete_callback is GLOBUS_NULL
  • handle already 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 an ftp or gsiftp URL.
  • 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 the complete_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 an ftp or gsiftp URL.
  • 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 an ftp or gsiftp URL.
  • 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 the complete_callback.
Note โš ๏ธ The source_attr and dest_attr MUST be compatible. For example, the MODE and TYPE should 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 an ftp or gsiftp URL.
  • attr โ€” Attributes for this file transfer.
  • u_features โ€” A pointer to a globus_ftp_client_features_t to 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 the complete_callback.

Returns

This function returns an error when any of these conditions are true:

  • u_handle is GLOBUS_NULL
  • source_url is GLOBUS_NULL
  • source_url cannot be parsed
  • source_url is not a ftp or gsiftp url
  • u_features is GLOBUS_NULL or badly initialized
  • complete_callback is GLOBUS_NULL
  • handle already 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 an ftp or gsiftp URL.
  • 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 the complete_callback.

Returns

This function returns an error when any of these conditions are true:

  • handle is GLOBUS_NULL
  • url is GLOBUS_NULL
  • url cannot be parsed
  • url is not a ftp or gsiftp url
  • complete_callback is GLOBUS_NULL
  • handle already 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 by globus_ftp_client_feat()
  • answer โ€” this variable will contain the answer
  • feature โ€” 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 an ftp or a gsiftp URL, 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 to complete_callback.

Returns

She returns an error when any of these are true, no cap:

  • handle is GLOBUS_NULL
  • url is GLOBUS_NULL
  • url cannot be parsed
  • url is not a ftp or gsiftp url
  • complete_callback is GLOBUS_NULL
  • handle already 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 an ftp or gsiftp URL.
  • attr โ€” attributes for this file transfer.
  • complete_callback โ€” callback invoked once the "list" is completed.
  • callback_arg โ€” argument passed to the complete_callback.

Returns

An error comes back when any of these are true:

  • handle is GLOBUS_NULL
  • url is GLOBUS_NULL
  • url cannot be parsed
  • url is not a ftp or gsiftp url
  • complete_callback is GLOBUS_NULL
  • handle already 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 an ftp or gsiftp URL.
  • attr โ€” attributes for this operation.
  • complete_callback โ€” callback invoked once the mkdir is completed.
  • callback_arg โ€” argument passed to the complete_callback.

Returns

She returns an error when any of these are true:

  • u_handle is GLOBUS_NULL
  • url is GLOBUS_NULL
  • url cannot be parsed
  • url is not a ftp or gsiftp url
  • complete_callback is GLOBUS_NULL
  • handle already 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 an ftp or gsiftp URL.
  • attr โ€” attributes for this file transfer.
  • mlst_buffer โ€” a pointer to a globus_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 a globus_size_t to be filled with the length of the data in mlst_buffer.
  • complete_callback โ€” callback invoked once the MLST command is completed.
  • callback_arg โ€” argument passed to the complete_callback.

Returns

An error when any of these are true:

  • handle is GLOBUS_NULL
  • url is GLOBUS_NULL
  • url cannot be parsed
  • url is not a ftp or gsiftp url
  • mlst_buffer is GLOBUS_NULL
  • mlst_buffer_length is GLOBUS_NULL
  • complete_callback is GLOBUS_NULL
  • handle already 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 an ftp or gsiftp URL.
  • attr โ€” attributes for this file transfer.
  • modification_time โ€” a pointer to a globus_abstime_t to 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 the complete_callback.

Returns

Error time when any of these are true:

  • handle is GLOBUS_NULL
  • url is GLOBUS_NULL
  • url cannot be parsed
  • url is not a ftp or gsiftp url
  • modification time is GLOBUS_NULL
  • complete_callback is GLOBUS_NULL
  • handle already 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. The host:port part of this URL is ignored.
  • attr โ€” attributes for this operation.
  • complete_callback โ€” callback invoked once the move is completed.
  • callback_arg โ€” argument passed to the complete_callback.

Returns

An error when any of these are true:

  • handle is GLOBUS_NULL
  • source_url is GLOBUS_NULL
  • source_url cannot be parsed
  • source_url is not a ftp or gsiftp url
  • complete_callback is GLOBUS_NULL
  • handle already 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 an ftp or gsiftp URL.
  • 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 -1 for EOF.
  • complete_callback โ€” callback invoked once the "get" is completed.
  • callback_arg โ€” argument passed to the complete_callback.

Returns

An error when any of these are true:

  • handle is GLOBUS_NULL
  • url is GLOBUS_NULL
  • url cannot be parsed
  • url is not a ftp or gsiftp url
  • complete_callback is GLOBUS_NULL
  • handle already 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 an ftp or gsiftp URL.
  • 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 -1 for EOF.
  • complete_callback โ€” callback invoked once the "put" is completed.
  • callback_arg โ€” argument passed to the complete_callback.
  • handle โ€” the FTP Client handle you're doing this put with ๐Ÿซถ
  • url โ€” where the data goes. Can be an ftp or gsiftp URL, bestie.
  • 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
  • complete_callback โ€” callback that gets invoked once the "put" is completed ๐Ÿ’–
  • callback_arg โ€” argument passed along to the complete_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 an ftp or gsiftp URL.
  • source_attr โ€” attributes for the source URL.
  • dest_url โ€” the destination URL for the transfer. May be an ftp or gsiftp URL.
  • 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 -1 for EOF.
  • complete_callback โ€” callback invoked once the "put" is completed.
  • callback_arg โ€” argument to be passed to the complete_callback.
๐Ÿšจ Note: the source_attr and dest_attr MUST be compatible. Like, for example, the MODE and TYPE should 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 an ftp or gsiftp URL.
  • 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 the complete_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 an ftp or gsiftp URL.
  • attr โ€” attributes for this file transfer.
  • complete_callback โ€” callback to be invoked once the "list" is completed.
  • callback_arg โ€” argument to be passed to the complete_callback.

Returns

This function returns an error when any of these conditions are true, and every single one of them counts:

  • handle is GLOBUS_NULL
  • url is GLOBUS_NULL
  • url cannot be parsed
  • url is not a ftp or gsiftp url
  • complete_callback is GLOBUS_NULL
  • handle already 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 an ftp or gsiftp URL.
  • attr โ€” attributes for this operation.
  • complete_callback โ€” callback to be invoked once the rmdir is completed.
  • callback_arg โ€” argument to be passed to the complete_callback.

Returns

This function returns an error when any of these conditions are true:

  • u_handle is GLOBUS_NULL
  • url is GLOBUS_NULL
  • url cannot be parsed
  • url is not a ftp or gsiftp url
  • complete_callback is GLOBUS_NULL
  • handle already 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 an ftp or gsiftp URL.
  • attr โ€” attributes for this file transfer.
  • size โ€” a pointer to a globus_off_t to 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 the complete_callback.

Returns

This function returns an error when any of these conditions are true:

  • handle is GLOBUS_NULL
  • url is GLOBUS_NULL
  • url cannot be parsed
  • url is not a ftp or gsiftp url
  • size is GLOBUS_NULL
  • complete_callback is GLOBUS_NULL
  • handle already 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 an ftp or gsiftp URL.
  • attr โ€” attributes for this file transfer.
  • stat_buffer โ€” a pointer to a globus_byte_t * to be allocated and filled with the STAT listing 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 a globus_size_t to be filled with the length of the data in stat_buffer.
  • complete_callback โ€” callback to be invoked once the STAT command is completed.
  • callback_arg โ€” argument to be passed to the complete_callback.

Returns

This function returns an error when any of these conditions are true:

  • handle is GLOBUS_NULL
  • url is GLOBUS_NULL
  • url cannot be parsed
  • url is not a ftp or gsiftp url
  • stat_buffer is GLOBUS_NULL
  • stat_buffer_length is GLOBUS_NULL
  • complete_callback is GLOBUS_NULL
  • handle already has an operation in progress

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. The host:port part 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 the complete_callback.

Returns

This function returns an error when any of these conditions are true:

  • handle is GLOBUS_NULL
  • source_url is GLOBUS_NULL
  • source_url cannot be parsed
  • source_url is not a ftp or gsiftp url
  • complete_callback is GLOBUS_NULL
  • handle already 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 an ftp or gsiftp URL.
  • source_attr โ€” Attributes for the source URL.
  • dest_url โ€” The destination URL for the transfer. The URL may be an ftp or gsiftp URL.
  • 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 the complete_callback.
Note ๐Ÿ‘ โ€” the source_attr and dest_attr MUST be compatible. For example, the MODE and TYPE should 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 the complete_callback.

Returns โ€” This function returns an error when any of these conditions are true:

  • handle is GLOBUS_NULL
  • url is GLOBUS_NULL
  • url cannot be parsed
  • url is not a ftp or gsiftp url
  • complete_callback is GLOBUS_NULL
  • handle already 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 an ftp or gsiftp URL.
  • attr โ€” Attributes for this file transfer.
  • complete_callback โ€” Callback to be invoked once the "list" is completed.
  • callback_arg โ€” Argument to be passed to the complete_callback.

Returns โ€” This function returns an error when any of these conditions are true:

  • handle is GLOBUS_NULL
  • url is GLOBUS_NULL
  • url cannot be parsed
  • url is not a ftp or gsiftp url
  • complete_callback is GLOBUS_NULL
  • handle already 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