Provided by: libglobus-ftp-client-doc_9.8-4_all
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. Enumerations enum globus_ftp_client_tristate_t enum globus_ftp_client_probed_feature_t File or Directory Existence 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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
typedef void(* globus_ftp_client_complete_callback_t) (void *user_arg, globus_ftp_client_handle_t *handle, globus_object_t *error) Operation complete callback. Every FTP Client operation (get, put, transfer, mkdir, etc) is asynchronous. A callback of this type is passed to each of the operation function calls to let the user know when the operation is complete. The completion callback is called only once per operation, after all other callbacks for the operation have returned. Parameters user_arg The user_arg parameter passed to the operation. handle The handle on which the operation was done. error A Globus error object indicating any problem which occurred, or GLOBUS_SUCCESS, if the operation completed successfully. typedef struct globus_i_ftp_client_features_s* globus_ftp_client_features_t Feature Handle. Handle used to associate state with feature operations. 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 enum globus_ftp_client_tristate_t Types for feature existence 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_result_t globus_ftp_client_abort (globus_ftp_client_handle_t * u_handle) Abort the operation currently in progress. Parameters u_handle Handle which to abort. 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 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 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 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 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 is 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 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. 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 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 functions will only delete files, not directories. 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_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 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. This function differs from the globus_ftp_client_get() function by allowing the user to invoke server-side data processing algorithms. GridFTP servers may support 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. 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_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 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_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 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 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_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_result_t globus_ftp_client_features_destroy (globus_ftp_client_features_t * u_features) Destroy the feature set. Note Structure passed to this function must have been previously initialized by globus_ftp_client_features_init(). Returns GLOBUS_SUCCESS on success, otherwise error. 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 Structure initialized by this function must be destroyed using globus_ftp_client_features_destroy() Returns GLOBUS_SUCCESS on success, otherwise error. 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_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_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 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() 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. This function starts a 'MLSD' 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 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() 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. This function starts a mkdir operation on a FTP server. When the response to the mkdir request has been received the complete_callback will be 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. The URL may be an ftp or gsiftp URL. attr Attributes for this operation. complete_callback Callback to be invoked once the mkdir 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_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. This function requests the MLST fact string of a file or directory from an FTP server. When the MLST request is completed or aborted, the complete_callback will be invoked with the final status of the operation. If the callback is returns without an error, the MLST fact string will be stored in the globus_byte_t * pointed to by the mlst_buffer parameter to this function. Parameters u_handle An FTP Client handle to use for the list operation. url The URL of a file or directory to list. The URL may be an ftp or gsiftp URL. attr Attributes for this file transfer. mlst_buffer A pointer to a globus_byte_t * to be allocated and filled with the MLST fact string of the file, if it exists. Otherwise, the value pointed to by it is undefined. It is up to the user 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 to be invoked once the MLST 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 • mlst_buffer is GLOBUS_NULL • mlst_buffer_length is GLOBUS_NULL • complete_callback is GLOBUS_NULL • handle already has an operation in progress 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. This function requests the modification time of a file from an FTP server. When the modification time request is completed or aborted, the complete_callback will be invoked with the final status of the operation. If the callback is returns without an error, the modification time will be stored in the globus_abstime_t value pointed to by the modification_time parameter to this function. 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. 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 pointed to by it is undefined. complete_callback Callback to be invoked once the modification time 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 • modification time is GLOBUS_NULL • complete_callback is GLOBUS_NULL • handle already has an operation in progress 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. This function starts a move (rename) operation on an FTP server. Note that this function does not move files between FTP servers and that the host:port part of the destination url is ignored. When the response to the move request has been received the complete_callback will be 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 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 • 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_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. 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. 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 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 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. 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. 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. partial_offset Starting offset for a partial file put. partial_end_offset Ending offset for a partial file put. 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_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 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. 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. 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 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_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 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. 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. 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_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 function starts a 'MLSR' 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 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() 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 function starts a rmdir operation on a FTP server. 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 An FTP Client handle to use for the rmdir operation. url The URL for the directory to create. The URL 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_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 function requests the size of a file from an FTP server. When the size request is completed or aborted, the complete_callback will be invoked with the final status of the operation. If the callback is returns without an error, the size will be stored in the globus_off_t value pointed to by the size parameter to 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 which is returned in the data callbacks may be less than this amount. 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. 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_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 function 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 is returns without an error, the STAT fact string will be stored in the globus_byte_t * pointed to by the stat_buffer parameter to this function. Parameters u_handle An FTP Client handle to use for the list operation. url The URL of a file or directory to list. The URL 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 the user to free this memory. 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 function creates a symbolic link on the FTP server pointing to a given path. Note that this function does not link files between FTP servers and that the host:port part of the link url is ignored. 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 An 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. 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. 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. 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 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. 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 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.