---
name: "globus_gass_copy.c"
section: "3"
platform: "linux"
package: "libglobus-gass-copy-doc"
version: "8.4-1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/globus_gass_copy.c"
---

# globus\_gass\_copy.c(3)

## NAME

globus\_gass\_copy.c -

## SYNOPSIS

### Functions

globus\_result\_t **globus\_gass\_copy\_handle\_init** (globus\_gass\_copy\_handle\_t \*handle, globus\_gass\_copy\_handleattr\_t \*attr)\
 globus\_result\_t **globus\_gass\_copy\_handle\_destroy** (globus\_gass\_copy\_handle\_t \*handle)\
 globus\_result\_t **globus\_gass\_copy\_set\_buffer\_length** (globus\_gass\_copy\_handle\_t \*handle, int length)\
 globus\_result\_t **globus\_gass\_copy\_get\_buffer\_length** (globus\_gass\_copy\_handle\_t \*handle, int \*length)\
 globus\_result\_t **globus\_gass\_copy\_set\_no\_third\_party\_transfers** (globus\_gass\_copy\_handle\_t \*handle, globus\_bool\_t no\_third\_party\_transfers)\
 globus\_result\_t **globus\_gass\_copy\_get\_no\_third\_party\_transfers** (globus\_gass\_copy\_handle\_t \*handle, globus\_bool\_t \*no\_third\_party\_transfers)\
 globus\_result\_t **globus\_gass\_copy\_set\_allocate** (globus\_gass\_copy\_handle\_t \*handle, globus\_bool\_t send\_allo)\
 globus\_result\_t **globus\_gass\_copy\_set\_stat\_on\_expand** (globus\_gass\_copy\_handle\_t \*handle, globus\_bool\_t always\_stat)\
 globus\_result\_t **globus\_gass\_copy\_set\_partial\_offsets** (globus\_gass\_copy\_handle\_t \*handle, globus\_off\_t offset, globus\_off\_t end\_offset)\
 globus\_result\_t **globus\_gass\_copy\_get\_partial\_offsets** (globus\_gass\_copy\_handle\_t \*handle, globus\_off\_t \*offset, globus\_off\_t \*end\_offset)\
 globus\_result\_t **globus\_gass\_copy\_attr\_init** (globus\_gass\_copy\_attr\_t \*attr)\
 globus\_result\_t **globus\_gass\_copy\_attr\_set\_ftp** (globus\_gass\_copy\_attr\_t \*attr, globus\_ftp\_client\_operationattr\_t \*ftp\_attr)\
 globus\_result\_t **globus\_gass\_copy\_attr\_set\_io** (globus\_gass\_copy\_attr\_t \*attr, globus\_io\_attr\_t \*io\_attr)\
 globus\_result\_t **globus\_gass\_copy\_attr\_set\_gass** (globus\_gass\_copy\_attr\_t \*attr, globus\_gass\_transfer\_requestattr\_t \*gass\_attr)\
 globus\_result\_t **globus\_gass\_copy\_get\_url\_mode** (char \*url, globus\_gass\_copy\_url\_mode\_t \*mode)\
 globus\_result\_t **globus\_gass\_copy\_register\_performance\_cb** (globus\_gass\_copy\_handle\_t \*handle, **globus\_gass\_copy\_performance\_cb\_t** callback, void \*user\_arg)\
 globus\_result\_t **globus\_gass\_copy\_get\_status** (globus\_gass\_copy\_handle\_t \*handle, globus\_gass\_copy\_status\_t \*status)\
 const char \* **globus\_gass\_copy\_get\_status\_string** (globus\_gass\_copy\_handle\_t \*handle)\
 globus\_result\_t **globus\_gass\_copy\_url\_to\_url** (globus\_gass\_copy\_handle\_t \*handle, char \*source\_url, globus\_gass\_copy\_attr\_t \*source\_attr, char \*dest\_url, globus\_gass\_copy\_attr\_t \*dest\_attr)\
 globus\_result\_t **globus\_gass\_copy\_url\_to\_handle** (globus\_gass\_copy\_handle\_t \*handle, char \*source\_url, globus\_gass\_copy\_attr\_t \*source\_attr, globus\_io\_handle\_t \*dest\_handle)\
 globus\_result\_t **globus\_gass\_copy\_handle\_to\_url** (globus\_gass\_copy\_handle\_t \*handle, globus\_io\_handle\_t \*source\_handle, char \*dest\_url, globus\_gass\_copy\_attr\_t \*dest\_attr)\
 globus\_result\_t **globus\_gass\_copy\_register\_url\_to\_url** (globus\_gass\_copy\_handle\_t \*handle, char \*source\_url, globus\_gass\_copy\_attr\_t \*source\_attr, char \*dest\_url, globus\_gass\_copy\_attr\_t \*dest\_attr, globus\_gass\_copy\_callback\_t callback\_func, void \*callback\_arg)\
 globus\_result\_t **globus\_gass\_copy\_register\_url\_to\_handle** (globus\_gass\_copy\_handle\_t \*handle, char \*source\_url, globus\_gass\_copy\_attr\_t \*source\_attr, globus\_io\_handle\_t \*dest\_handle, globus\_gass\_copy\_callback\_t callback\_func, void \*callback\_arg)\
 globus\_result\_t **globus\_gass\_copy\_register\_handle\_to\_url** (globus\_gass\_copy\_handle\_t \*handle, globus\_io\_handle\_t \*source\_handle, char \*dest\_url, globus\_gass\_copy\_attr\_t \*dest\_attr, globus\_gass\_copy\_callback\_t callback\_func, void \*callback\_arg)\
 globus\_result\_t **globus\_gass\_copy\_cache\_url\_state** (globus\_gass\_copy\_handle\_t \*handle, char \*url)\
 globus\_result\_t **globus\_gass\_copy\_flush\_url\_state** (globus\_gass\_copy\_handle\_t \*handle, char \*url)\
 globus\_result\_t **globus\_gass\_copy\_set\_user\_pointer** (globus\_gass\_copy\_handle\_t \*handle, void \*user\_pointer)\
 globus\_result\_t **globus\_gass\_copy\_get\_user\_pointer** (globus\_gass\_copy\_handle\_t \*handle, void \*\*user\_data)\
 globus\_result\_t **globus\_gass\_copy\_cancel** (globus\_gass\_copy\_handle\_t \*handle, globus\_gass\_copy\_callback\_t cancel\_callback, void \*cancel\_callback\_arg)\
 globus\_result\_t **globus\_l\_gass\_copy\_target\_cancel** (**globus\_i\_gass\_copy\_cancel\_t** \*cancel\_info)\

## Detailed Description

Globus GASS Copy library.

**See also:**

See the detailed description in **globus\_gass\_copy.h**

## Function Documentation

### globus\_result\_t globus\_gass\_copy\_handle\_init (globus\_gass\_copy\_handle\_t \*handle, globus\_gass\_copy\_handleattr\_t \*attr)

Initialize a GASS Copy handle. A globus\_gass\_copy\_handle must be initialized before any transfers may be associated with it. This function initializes a globus\_gass\_copy\_handle to be used for doing transfers, this includes initializing a globus\_ftp\_client\_handle which will be used for doing any ftp/gsiftp transfers. The same handle may be used to perform multiple, consecutive transfers. However, there can only be one transfer associated with a particular handle at any given time. After all transfers to be associated with this handle have completed, the handle should be destroyed by calling **globus\_gass\_copy\_handle\_destroy()**.

**Parameters:**

*handle* The handle to be initialized \
 *attr* The handle attributes used to use with this handle

**Returns:**

This function returns GLOBUS\_SUCCESS if successful, or a globus\_result\_t indicating the error that occurred.

**See also:**

**globus\_gass\_copy\_handle\_destroy()** , globus\_gass\_copy\_handleattr\_init(), globus\_ftp\_client\_hande\_init()

References GLOBUS\_GASS\_COPY\_MODULE.

### globus\_result\_t globus\_gass\_copy\_handle\_destroy (globus\_gass\_copy\_handle\_t \*handle)

Destroy a GASS Copy handle. Destroy a gass\_copy\_handle, which was initialized using **globus\_gass\_copy\_handle\_init()**, that will no longer be used for doing transfers. Once the handle is detroyed, no further transfers should be associated with it.

**Parameters:**

*handle* The handle to be destroyed

**Returns:**

This function returns GLOBUS\_SUCCESS if successful, or a globus\_result\_t indicating the error that occurred.

**See also:**

**globus\_gass\_copy\_handle\_init()**, globus\_ftp\_client\_handle\_destroy()

References GLOBUS\_GASS\_COPY\_MODULE.

### globus\_result\_t globus\_gass\_copy\_set\_buffer\_length (globus\_gass\_copy\_handle\_t \*handle, intlength)

Set the size of the buffer to be used for doing transfers. This function allows the user to set the size of the buffer that will be used for doing transfers, if this function is not called the buffer size will default to 1M.

**Parameters:**

*handle* Set the buffer length for transfers associated with this handle. \
 *length* The length, in bytes, to make the buffer.

**Returns:**

This function returns GLOBUS\_SUCCESS if successful, or a globus\_result\_t indicating the error that occurred.

References GLOBUS\_GASS\_COPY\_MODULE.

### globus\_result\_t globus\_gass\_copy\_get\_buffer\_length (globus\_gass\_copy\_handle\_t \*handle, int \*length)

Get the size of the buffer being used for doing transfers. This function allows the user to get the size of the buffer that is being used for doing transfers.

**Parameters:**

*handle* Get the buffer length for transfers associated with this handle. \
 *length* The length, in bytes, of the buffer.

**Returns:**

This function returns GLOBUS\_SUCCESS if successful, or a globus\_result\_t indicating the error that occurred.

References GLOBUS\_GASS\_COPY\_MODULE.

### globus\_result\_t globus\_gass\_copy\_set\_no\_third\_party\_transfers (globus\_gass\_copy\_handle\_t \*handle, globus\_bool\_tno\_third\_party\_transfers)

Turn third-party transfers on or off. (They are on by default.)

This function allows the user to turn third-party transfers on or off for ftp to ftp transfers associated with a particular handle. This is often desired if one of the servers involved in the transfer does not allow third-party transfers.

**Parameters:**

*handle* Turn third-party transfers on or off for transfers associated with this handle. They are on by default. \
 *no\_third\_party\_transfers* GLOBUS\_FALSE if third-party transfers should be used. GLOBUS\_TRUE if third-party transfers should not be used.

**Returns:**

This function returns GLOBUS\_SUCCESS if successful, or a globus\_result\_t indicating the error that occurred.

References globus\_gass\_copy\_get\_status(), and GLOBUS\_GASS\_COPY\_MODULE.

### globus\_result\_t globus\_gass\_copy\_get\_no\_third\_party\_transfers (globus\_gass\_copy\_handle\_t \*handle, globus\_bool\_t \*no\_third\_party\_transfers)

See if third-party transfers are turned on or off. (They are on by default.)

This function allows the user to see if third-party transfers are turned on or off for ftp to ftp transfers associated with a particular handle. This is often desired if one of the servers involved in the transfer does not allow third-party transfers.

**Parameters:**

*handle* See if third-party transfers are turned on or off for transfers associated with this handle. They are on by default. \
 *no\_third\_party\_transfers* GLOBUS\_FALSE if third-party transfers should be used. GLOBUS\_TRUE if third-party transfers should not be used.

**Returns:**

This function returns GLOBUS\_SUCCESS if successful, or a globus\_result\_t indicating the error that occurred.

References GLOBUS\_GASS\_COPY\_MODULE.

### globus\_result\_t globus\_gass\_copy\_set\_allocate (globus\_gass\_copy\_handle\_t \*handle, globus\_bool\_tsend\_allo)

Set allo on or off.

### globus\_result\_t globus\_gass\_copy\_set\_stat\_on\_expand (globus\_gass\_copy\_handle\_t \*handle, globus\_bool\_talways\_stat)

Make globus\_gass\_copy\_expand\_url() always send stat info.

### globus\_result\_t globus\_gass\_copy\_set\_partial\_offsets (globus\_gass\_copy\_handle\_t \*handle, globus\_off\_toffset, globus\_off\_tend\_offset)

Set the offsets to be used for doing partial transfers. This function allows the user to set the offsets that will be used for doing partial transfers. An offset of -1 will disable partial transfers. An end\_offset of -1 means EOF.

**Parameters:**

*handle* Set the offsets for partial transfers associated with this handle. \
 *offset* The starting offset for the partial transfer. \
 *end\_offset* The ending offset for the partial transfer.

**Returns:**

This function returns GLOBUS\_SUCCESS if successful, or a globus\_result\_t indicating the error that occurred.

References GLOBUS\_GASS\_COPY\_MODULE.

### globus\_result\_t globus\_gass\_copy\_get\_partial\_offsets (globus\_gass\_copy\_handle\_t \*handle, globus\_off\_t \*offset, globus\_off\_t \*end\_offset)

Get the offsets being used for doing partial transfers. This function allows the user to get the offsets that are being used for doing partial transfers. An offset of -1 means partial transfers are disabled.

**Parameters:**

*handle* Get the offsets for partial transfers associated with this handle. \
 *offset* The starting offset for the partial transfer. \
 *end\_offset* The ending offset for the partial transfer.

**Returns:**

This function returns GLOBUS\_SUCCESS if successful, or a globus\_result\_t indicating the error that occurred.

References GLOBUS\_GASS\_COPY\_MODULE.

### globus\_result\_t globus\_gass\_copy\_attr\_init (globus\_gass\_copy\_attr\_t \*attr)

Initialize an attribute structure. The globus\_gass\_copy\_attr\_t can be used to pass the globus\_gass\_copy library information about how a transfer should be performed. It must first be initialized by calling this function. Then any or all of the following functions may be called to set attributes associated with a particular protocol: **globus\_gass\_copy\_attr\_set\_ftp()**, **globus\_gass\_copy\_attr\_set\_gass()**, **globus\_gass\_copy\_attr\_set\_io()**. Any function which takes a globus\_gass\_copy\_attr\_t as an argument will also accept GLOBUS\_NULL, in which case the appropriate set of default attributes will be used.

**Parameters:**

*attr* The attribute structure to be initialized

**Returns:**

This function returns GLOBUS\_SUCCESS if successful, or a globus\_result\_t indicating the error that occurred.

**See also:**

**globus\_gass\_copy\_attr\_set\_ftp()**, **globus\_gass\_copy\_attr\_set\_gass()**, **globus\_gass\_copy\_attr\_set\_io()**, **globus\_gass\_copy\_get\_url\_mode()**.

References GLOBUS\_GASS\_COPY\_MODULE.

### globus\_result\_t globus\_gass\_copy\_attr\_set\_ftp (globus\_gass\_copy\_attr\_t \*attr, globus\_ftp\_client\_operationattr\_t \*ftp\_attr)

Set the attributes for ftp/gsiftp transfers. In order to specify attributes for ftp/gsiftp transfers, a globus\_ftp\_client\_operationattr\_t should be initialized and its values set using the appropriate globus\_ftp\_client\_operationattr\_\* functions. The globus\_ftp\_client\_operationattr\_t \* can then be passed to the globus\_gass\_copy\_attr\_t via this function.

**Parameters:**

*attr* A globus\_gass\_copy attribute structure \
 *ftp\_attr* The ftp/gsiftp attributes to be used

**Returns:**

This function returns GLOBUS\_SUCCESS if successful, or a globus\_result\_t indicating the error that occurred.

**See also:**

**globus\_gass\_copy\_attr\_init()**, **globus\_gass\_copy\_attr\_set\_gass()**, **globus\_gass\_copy\_attr\_set\_io()**, **globus\_gass\_copy\_get\_url\_mode()**, globus\_ftp\_client\_operationattr\_\*

References GLOBUS\_GASS\_COPY\_MODULE.

### globus\_result\_t globus\_gass\_copy\_attr\_set\_io (globus\_gass\_copy\_attr\_t \*attr, globus\_io\_attr\_t \*io\_attr)

Set the attributes for file transfers. In order to specify attributes for file transfers, a globus\_io\_attr\_t should be initialized and its values set using the appropriate globus\_io\_attr\_\* functions. The globus\_io\_attr\_t can then be passed to the globus\_gass\_copy\_attr\_t via this function.

**Parameters:**

*attr* A globus\_gass\_copy attribute structure \
 *io\_attr* The file attributes to be used

**Returns:**

This function returns GLOBUS\_SUCCESS if successful, or a globus\_result\_t indicating the error that occurred.

**See also:**

**globus\_gass\_copy\_attr\_init()**, **globus\_gass\_copy\_attr\_set\_gass()**, **globus\_gass\_copy\_attr\_set\_ftp()**, **globus\_gass\_copy\_get\_url\_mode()**, globus\_io\_attr\_\*

References GLOBUS\_GASS\_COPY\_MODULE.

### globus\_result\_t globus\_gass\_copy\_attr\_set\_gass (globus\_gass\_copy\_attr\_t \*attr, globus\_gass\_transfer\_requestattr\_t \*gass\_attr)

Set the attributes for http/https transfers. In order to specify attributes for http/https transfers, a globus\_gass\_transfer\_requestattr\_t should be initialized and its values set using the appropriate globus\_gass\_transfer\_requestattr\_\* functions. The globus\_gass\_transfer\_requestattr\_t can then be passed to the globus\_gass\_copy\_attr\_t via this function.

**Parameters:**

*attr* A globus\_gass\_copy attribute structure \
 *gass\_attr* The http/https attributes to be used

**Returns:**

This function returns GLOBUS\_SUCCESS if successful, or a globus\_result\_t indicating the error that occurred.

**See also:**

**globus\_gass\_copy\_attr\_init()**, **globus\_gass\_copy\_attr\_set\_io()**, **globus\_gass\_copy\_attr\_set\_ftp()**, **globus\_gass\_copy\_get\_url\_mode()**, globus\_gass\_transfer\_requestattr\_\*

References GLOBUS\_GASS\_COPY\_MODULE.

### globus\_result\_t globus\_gass\_copy\_get\_url\_mode (char \*url, globus\_gass\_copy\_url\_mode\_t \*mode)

Classify the URL schema into the transfer method that will be used to do the actual tranfer. This function enables the user to determine what protocol will be used to transfer data to/from a particular url. This information can then be used to specify the appropriate attributes when initiating a transfer.

**Parameters:**

*url* The URL for schema checking \
 *mode* the filled in schema type of the URL param

**Returns:**

This function returns GLOBUS\_SUCCESS if successful, or a globus\_result\_t indicating the error that occurred.

**See also:**

**globus\_gass\_copy\_attr\_init()**, **globus\_gass\_copy\_attr\_set\_io()**, **globus\_gass\_copy\_attr\_set\_ftp()**, globus\_gass\_copy\_set\_gass()

References GLOBUS\_GASS\_COPY\_MODULE.

### globus\_result\_t globus\_gass\_copy\_register\_performance\_cb (globus\_gass\_copy\_handle\_t \*handle, globus\_gass\_copy\_performance\_cb\_tcallback, void \*user\_arg)

Register a performance information callback. Use this to register a performance information callback. You change or set to GLOBUS\_NULL the callback any time a transfer is not occurring.

**Parameters:**

*handle* an initialized gass copy handle for which you would like to see performance info\
 *callback* the performance callback\
 *user\_arg* a user pointer that will be passed to all callbacks for a given handle

**Returns:**

- •

  GLOBUS\_SUCCESS

- •

  error on a NULL or busy handle

**See also:**

**globus\_gass\_copy\_performance\_cb\_t**

References GLOBUS\_GASS\_COPY\_MODULE.

### globus\_result\_t globus\_gass\_copy\_get\_status (globus\_gass\_copy\_handle\_t \*handle, globus\_gass\_copy\_status\_t \*status)

Get the status code of the current transfer. Get the status of the last transfer to be initiated using the given handle. Only one transfer can be active on a handle at a given time, therefore new transfers may only be initiated when the current status is one of the following: GLOBUS\_GASS\_COPY\_STATUS\_NONE, GLOBUS\_GASS\_COPY\_STATUS\_DONE\_SUCCESS, GLOBUS\_GASS\_COPY\_STATUS\_DONE\_FAILURE, GLOBUS\_GASS\_COPY\_STATUS\_DONE\_CANCELLED

**Parameters:**

*handle* A globus\_gass\_copy\_handle \
 *status* Will be one of the following: GLOBUS\_GASS\_COPY\_STATUS\_NONE (No transfers have been initiated using this handle.) GLOBUS\_GASS\_COPY\_STATUS\_PENDING (A transfer is currently being set up.) GLOBUS\_GASS\_COPY\_STATUS\_TRANSFER\_IN\_PROGRESS (There is currently a transfer in progress.) GLOBUS\_GASS\_COPY\_STATUS\_CANCEL (The last transfer initiated using this handle has been cancelled by the user before completing, and is in the process of being cleaned up.) GLOBUS\_GASS\_COPY\_STATUS\_FAILURE (The last transfer initiated using this handle failed, and is in the process of being cleaned up.) GLOBUS\_GASS\_COPY\_STATUS\_DONE\_SUCCESS (The last transfer initiated using this handle has completed successfully.) GLOBUS\_GASS\_COPY\_STATUS\_DONE\_FAILURE (The last transfer initiated using this handle failed and has finished cleaning up.) GLOBUS\_GASS\_COPY\_STATUS\_DONE\_CANCELLED (The last transfer initiated using this handle was cancelled and has finished cleaning up.)

**Returns:**

This function returns GLOBUS\_SUCCESS if successful, or a globus\_result\_t indicating the error that occurred.

References GLOBUS\_GASS\_COPY\_MODULE.

### const char\* globus\_gass\_copy\_get\_status\_string (globus\_gass\_copy\_handle\_t \*handle)

Get the status string of the current transfer. Get the status of the last transfer to be initiated using the given handle. Only one transfer can be active on a handle at a given time, therefore new transfers may only be initiated when the current status is one of the following: GLOBUS\_GASS\_COPY\_STATUS\_NONE, GLOBUS\_GASS\_COPY\_STATUS\_DONE\_SUCCESS, GLOBUS\_GASS\_COPY\_STATUS\_DONE\_FAILURE, GLOBUS\_GASS\_COPY\_STATUS\_DONE\_CANCELLED

**Parameters:**

*handle* A globus\_gass\_copy\_handle

**Returns:**

Returns a pointer to a character string describing the current status

References globus\_gass\_copy\_get\_status().

### globus\_result\_t globus\_gass\_copy\_url\_to\_url (globus\_gass\_copy\_handle\_t \*handle, char \*source\_url, globus\_gass\_copy\_attr\_t \*source\_attr, char \*dest\_url, globus\_gass\_copy\_attr\_t \*dest\_attr)

Transfer data from source URL to destination URL (blocking) **Parameters:**

*handle* The handle to perform the copy operation \
 *source\_url* transfer data from this URL \
 *source\_attr* Attributes describing how the transfer form the source should be done \
 *dest\_url* transfer data to this URL \
 *dest\_attr* Attributes describing how the transfer to the destination should be done

**Returns:**

This function returns GLOBUS\_SUCCESS if the transfer was completed successfully, or a result pointing to an object of one of the the following error types:

**Return values:**

*GLOBUS\_GASS\_COPY\_ERROR\_TYPE\_NULL\_PARAMETER* The handle was equal to GLOBUS\_NULL, so the transfer could not processed. \
 *GLOBUS\_GASS\_COPY\_ERROR\_TYPE\_next\_error* next error description

**See also:**

**globus\_gass\_copy\_url\_to\_handle()** **globus\_gass\_copy\_handle\_to\_url()**

References GLOBUS\_GASS\_COPY\_MODULE, and globus\_gass\_copy\_register\_url\_to\_url().

### globus\_result\_t globus\_gass\_copy\_url\_to\_handle (globus\_gass\_copy\_handle\_t \*handle, char \*source\_url, globus\_gass\_copy\_attr\_t \*source\_attr, globus\_io\_handle\_t \*dest\_handle)

Transfer data from source URL to an IO handle (blocking) **Parameters:**

*handle* The handle to perform the copy operation \
 *source\_url* transfer data from this URL \
 *source\_attr* Attributes describing how the transfer form the source should be done \
 *dest\_handle* transfer data to this IO handle

**Returns:**

This function returns GLOBUS\_SUCCESS if the transfer was completed successfully, or a result pointing to an object of one of the the following error types:

**Return values:**

*GLOBUS\_GASS\_COPY\_ERROR\_TYPE\_NULL\_PARAMETER* The handle was equal to GLOBUS\_NULL, so the transfer could not processed. \
 *GLOBUS\_GASS\_COPY\_ERROR\_TYPE\_next\_error* next error description

**See also:**

**globus\_gass\_copy\_url\_to\_url()** **globus\_gass\_copy\_handle\_to\_url()**

References GLOBUS\_GASS\_COPY\_MODULE, and globus\_gass\_copy\_register\_url\_to\_handle().

### globus\_result\_t globus\_gass\_copy\_handle\_to\_url (globus\_gass\_copy\_handle\_t \*handle, globus\_io\_handle\_t \*source\_handle, char \*dest\_url, globus\_gass\_copy\_attr\_t \*dest\_attr)

Transfer data from an IO handle to destination URL (blocking) **Parameters:**

*handle* The handle to perform the copy operation \
 *source\_handle* transfer data from this IO handle \
 *dest\_url* transfer data to this URL \
 *dest\_attr* Attributes describing how the transfer to the destination should be done

**Returns:**

This function returns GLOBUS\_SUCCESS if the transfer was completed successfully, or a result pointing to an object of one of the the following error types:

**Return values:**

*GLOBUS\_GASS\_COPY\_ERROR\_TYPE\_NULL\_PARAMETER* The handle was equal to GLOBUS\_NULL, so the transfer could not processed. \
 *GLOBUS\_GASS\_COPY\_ERROR\_TYPE\_next\_error* next error description

**See also:**

**globus\_gass\_copy\_url\_to\_url()** **globus\_gass\_copy\_url\_to\_handle()**

References GLOBUS\_GASS\_COPY\_MODULE, and globus\_gass\_copy\_register\_handle\_to\_url().

### globus\_result\_t globus\_gass\_copy\_register\_url\_to\_url (globus\_gass\_copy\_handle\_t \*handle, char \*source\_url, globus\_gass\_copy\_attr\_t \*source\_attr, char \*dest\_url, globus\_gass\_copy\_attr\_t \*dest\_attr, globus\_gass\_copy\_callback\_tcallback\_func, void \*callback\_arg)

Transfer data from source URL to destination URL (non-blocking) This functions initiates a transfer from source URL to destination URL, then returns immediately.

When the transfer is completed or if the transfer is aborted, the callback\_func will be invoked with the final status of the transfer.

**Parameters:**

*handle* The handle to perform the copy operation \
 *source\_url* transfer data from this URL \
 *source\_attr* Attributes describing how the transfer form the source should be done \
 *dest\_url* transfer data to this URL \
 *dest\_attr* Attributes describing how the transfer to the destination should be done \
 *callback\_func* Callback to be invoked once the transfer is completed. \
 *callback\_arg* Argument to be passed to the callback\_func.

**Returns:**

This function returns GLOBUS\_SUCCESS if the transfer was initiated successfully, or a result pointing to an object of one of the the following error types:

**Return values:**

*GLOBUS\_GASS\_COPY\_ERROR\_TYPE\_NULL\_PARAMETER* The handle was equal to GLOBUS\_NULL, so the transfer could not processed. \
 *GLOBUS\_GASS\_COPY\_ERROR\_TYPE\_next\_error* next error description

**See also:**

**globus\_gass\_copy\_register\_url\_to\_handle()**, **globus\_gass\_copy\_register\_handle\_to\_url()**

References globus\_i\_gass\_copy\_state\_target\_s::attr, globus\_gass\_copy\_state\_s::cancel, globus\_gass\_copy\_state\_s::dest, globus\_gass\_copy\_get\_url\_mode(), GLOBUS\_GASS\_COPY\_MODULE, and globus\_gass\_copy\_state\_s::source.

### globus\_result\_t globus\_gass\_copy\_register\_url\_to\_handle (globus\_gass\_copy\_handle\_t \*handle, char \*source\_url, globus\_gass\_copy\_attr\_t \*source\_attr, globus\_io\_handle\_t \*dest\_handle, globus\_gass\_copy\_callback\_tcallback\_func, void \*callback\_arg)

Transfer data from source URL to an IO handle (non-blocking) This functions initiates a transfer from source URL to an IO handle, then returns immediately.

When the transfer is completed or if the transfer is aborted, the callback\_func will be invoked with the final status of the transfer.

**Parameters:**

*handle* The handle to perform the copy operation \
 *source\_url* transfer data from this URL \
 *source\_attr* Attributes describing how the transfer form the source should be done \
 *dest\_handle* transfer data to this IO handle \
 *callback\_func* Callback to be invoked once the transfer is completed. \
 *callback\_arg* Argument to be passed to the callback\_func.

**Returns:**

This function returns GLOBUS\_SUCCESS if the transfer was initiated successfully, or a result pointing to an object of one of the the following error types:

**Return values:**

*GLOBUS\_GASS\_COPY\_ERROR\_TYPE\_NULL\_PARAMETER* The handle was equal to GLOBUS\_NULL, so the transfer could not processed. \
 *GLOBUS\_GASS\_COPY\_ERROR\_TYPE\_next\_error* next error description

**See also:**

**globus\_gass\_copy\_register\_url\_to\_url()**, **globus\_gass\_copy\_register\_handle\_to\_url()**

References globus\_gass\_copy\_state\_s::cancel, globus\_gass\_copy\_state\_s::dest, globus\_gass\_copy\_get\_url\_mode(), GLOBUS\_GASS\_COPY\_MODULE, and globus\_gass\_copy\_state\_s::source.

### globus\_result\_t globus\_gass\_copy\_register\_handle\_to\_url (globus\_gass\_copy\_handle\_t \*handle, globus\_io\_handle\_t \*source\_handle, char \*dest\_url, globus\_gass\_copy\_attr\_t \*dest\_attr, globus\_gass\_copy\_callback\_tcallback\_func, void \*callback\_arg)

Transfer data from an IO handle to destination URL (non-blocking) This functions initiates a transfer from an IO handle to destination URL, then returns immediately.

When the transfer is completed or if the transfer is aborted, the callback\_func will be invoked with the final status of the transfer.

**Parameters:**

*handle* The handle to perform the copy operation \
 *source\_handle* transfer data from this IO handle \
 *dest\_url* transfer data to this URL \
 *dest\_attr* Attributes describing how the transfer to the destination should be done \
 *callback\_func* Callback to be invoked once the transfer is completed. \
 *callback\_arg* Argument to be passed to the callback\_func.

**Returns:**

This function returns GLOBUS\_SUCCESS if the transfer was initiated successfully, or a result pointing to an object of one of the the following error types:

**Return values:**

*GLOBUS\_GASS\_COPY\_ERROR\_TYPE\_NULL\_PARAMETER* The handle was equal to GLOBUS\_NULL, so the transfer could not processed. \
 *GLOBUS\_GASS\_COPY\_ERROR\_TYPE\_next\_error* next error description

**See also:**

**globus\_gass\_copy\_register\_url\_to\_url()**, **globus\_gass\_copy\_register\_url\_to\_handle()**

References globus\_gass\_copy\_state\_s::cancel, globus\_gass\_copy\_state\_s::dest, globus\_gass\_copy\_get\_url\_mode(), GLOBUS\_GASS\_COPY\_MODULE, and globus\_gass\_copy\_state\_s::source.

### globus\_result\_t globus\_gass\_copy\_cache\_url\_state (globus\_gass\_copy\_handle\_t \*handle, char \*url)

Cache connections to an FTP or GSIFTP server. Explicitly cache connections to URL server. When an URL is cached, the connection to the URL server will not be closed after a file transfer completes.

**Parameters:**

*handle* Handle which will contain a cached connection to the URL server. \
 *url* The URL of the FTP or GSIFTP server to cache.

**Returns:**

This function returns GLOBUS\_SUCCESS if successful, or a globus\_result\_t indicating the error that occurred.

References GLOBUS\_GASS\_COPY\_MODULE.

### globus\_result\_t globus\_gass\_copy\_flush\_url\_state (globus\_gass\_copy\_handle\_t \*handle, char \*url)

Remove a cached connection to an FTP or GSIFTP server. Explicitly remove a cached connection to an FTP or GSIFTP server. If an idle connection to an FTP server exists, it will be closed.

**Parameters:**

*handle* Handle which contains a cached connection to the URL server. \
 *url* The URL of the FTP or GSIFTP server to remove.

**Returns:**

This function returns GLOBUS\_SUCCESS if successful, or a globus\_result\_t indicating the error that occurred.

References GLOBUS\_GASS\_COPY\_MODULE.

### globus\_result\_t globus\_gass\_copy\_set\_user\_pointer (globus\_gass\_copy\_handle\_t \*handle, void \*user\_pointer)

Set a pointer in the handle to point at user-allocated memory.

References GLOBUS\_GASS\_COPY\_MODULE.

### globus\_result\_t globus\_gass\_copy\_get\_user\_pointer (globus\_gass\_copy\_handle\_t \*handle, void \*\*user\_data)

Get the pointer in the handle that points to user-allocated memory.

References GLOBUS\_GASS\_COPY\_MODULE.

### globus\_result\_t globus\_gass\_copy\_cancel (globus\_gass\_copy\_handle\_t \*handle, globus\_gass\_copy\_callback\_tcancel\_callback, void \*cancel\_callback\_arg)

Cancel the current transfer associated with this handle,. store the cancel\_callback and cancel\_callback\_arg in the handle. Needed because the ftp callback will be the one given from the original globus\_ftp\_client\_third\_party\_transfer() call.

References GLOBUS\_GASS\_COPY\_MODULE, and globus\_l\_gass\_copy\_target\_cancel().

### globus\_result\_t globus\_l\_gass\_copy\_target\_cancel (globus\_i\_gass\_copy\_cancel\_t \*cancel\_info)

Cancel the source or destination transfer in progress.

References globus\_i\_gass\_copy\_state\_target\_s::data, globus\_i\_gass\_copy\_state\_target\_s::ftp, globus\_i\_gass\_copy\_state\_target\_s::gass, GLOBUS\_GASS\_COPY\_MODULE, globus\_i\_gass\_copy\_state\_target\_s::io, globus\_i\_gass\_copy\_state\_target\_s::mode, and globus\_i\_gass\_copy\_state\_target\_s::url.

## Author

Generated automatically by Doxygen for globus gass copy from the source code.
