---
name: "globus_ftp_client_tristate_t"
section: "3"
platform: "linux"
package: "libglobus-ftp-client-doc"
version: "9.8-4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/globus_ftp_client_operations"
---

# globus\_ftp\_client\_tristate\_t(3)

FTP Operations - FTP Operations.

Part of [globus\_ftp\_client\_operations(3)](/globus_ftp_client_operations/3.md).

## 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.
