---
name: "file_driver_cntls"
section: "3"
platform: "linux"
package: "libglobus-xio-doc"
version: "3.3-1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/file_driver_cntls"
---

# file\_driver\_cntls(3)

## NAME

Attributes and Cntls -

### Enumerations

enum **globus\_xio\_file\_attr\_cmd\_t** { **GLOBUS\_XIO\_FILE\_SET\_MODE**, **GLOBUS\_XIO\_FILE\_GET\_MODE**, **GLOBUS\_XIO\_FILE\_SET\_FLAGS**, **GLOBUS\_XIO\_FILE\_GET\_FLAGS**, **GLOBUS\_XIO\_FILE\_SET\_TRUNC\_OFFSET**, **GLOBUS\_XIO\_FILE\_GET\_TRUNC\_OFFSET**, **GLOBUS\_XIO\_FILE\_SET\_HANDLE**, **GLOBUS\_XIO\_FILE\_GET\_HANDLE**, **GLOBUS\_XIO\_FILE\_SET\_BLOCKING\_IO**, **GLOBUS\_XIO\_FILE\_GET\_BLOCKING\_IO**, **GLOBUS\_XIO\_FILE\_SEEK** }\

### Functions

globus\_result\_t **globus\_xio\_attr\_cntl** (attr, driver, **GLOBUS\_XIO\_FILE\_SET\_MODE**, int mode)\
 globus\_result\_t **globus\_xio\_attr\_cntl** (attr, driver, **GLOBUS\_XIO\_FILE\_GET\_MODE**, int \*mode\_out)\
 globus\_result\_t **globus\_xio\_attr\_cntl** (attr, driver, **GLOBUS\_XIO\_FILE\_SET\_FLAGS**, int flags)\
 globus\_result\_t **globus\_xio\_attr\_cntl** (attr, driver, **GLOBUS\_XIO\_FILE\_GET\_FLAGS**, int \*flags\_out)\
 globus\_result\_t **globus\_xio\_attr\_cntl** (attr, driver, **GLOBUS\_XIO\_FILE\_SET\_TRUNC\_OFFSET**, globus\_off\_t offset)\
 globus\_result\_t **globus\_xio\_attr\_cntl** (attr, driver, **GLOBUS\_XIO\_FILE\_GET\_TRUNC\_OFFSET**, globus\_off\_t \*offset\_out)\
 globus\_result\_t **globus\_xio\_attr\_cntl** (attr, driver, **GLOBUS\_XIO\_FILE\_SET\_HANDLE**, globus\_xio\_system\_file\_t handle)\
 globus\_result\_t **globus\_xio\_attr\_cntl** (attr, driver, **GLOBUS\_XIO\_FILE\_GET\_HANDLE**, globus\_xio\_system\_file\_t \*handle\_out)\
 globus\_result\_t **globus\_xio\_handle\_cntl** (handle, driver, **GLOBUS\_XIO\_FILE\_GET\_HANDLE**, globus\_xio\_system\_file\_t \*handle\_out)\
 globus\_result\_t **globus\_xio\_attr\_cntl** (attr, driver, **GLOBUS\_XIO\_FILE\_SET\_BLOCKING\_IO**, globus\_bool\_t use\_blocking\_io)\
 globus\_result\_t **globus\_xio\_handle\_cntl** (handle, driver, **GLOBUS\_XIO\_FILE\_SET\_BLOCKING\_IO**, globus\_bool\_t use\_blocking\_io)\
 globus\_result\_t **globus\_xio\_attr\_cntl** (attr, driver, **GLOBUS\_XIO\_FILE\_GET\_BLOCKING\_IO**, globus\_bool\_t \*use\_blocking\_io\_out)\
 globus\_result\_t **globus\_xio\_handle\_cntl** (handle, driver, **GLOBUS\_XIO\_FILE\_GET\_BLOCKING\_IO**, globus\_bool\_t \*use\_blocking\_io\_out)\
 globus\_result\_t **globus\_xio\_handle\_cntl** (handle, driver, **GLOBUS\_XIO\_FILE\_SEEK**, globus\_off\_t \*in\_out\_offset, **globus\_xio\_file\_whence\_t** whence)\

## Detailed Description

File driver specific attrs and cntls.

**See also:**

**globus\_xio\_attr\_cntl()**

**globus\_xio\_handle\_cntl()**

## Enumeration Type Documentation

### enum globus\_xio\_file\_attr\_cmd\_t

doxygen varargs filter stuff File driver specific cntls

**Enumerator:**

- *GLOBUS\_XIO\_FILE\_SET\_MODE*

  *See usage for:* **globus\_xio\_attr\_cntl** *.*

- *GLOBUS\_XIO\_FILE\_GET\_MODE*

  *See usage for:* **globus\_xio\_attr\_cntl** *.*

- *GLOBUS\_XIO\_FILE\_SET\_FLAGS*

  *See usage for:* **globus\_xio\_attr\_cntl** *.*

- *GLOBUS\_XIO\_FILE\_GET\_FLAGS*

  *See usage for:* **globus\_xio\_attr\_cntl** *.*

- *GLOBUS\_XIO\_FILE\_SET\_TRUNC\_OFFSET*

  *See usage for:* **globus\_xio\_attr\_cntl** *.*

- *GLOBUS\_XIO\_FILE\_GET\_TRUNC\_OFFSET*

  *See usage for:* **globus\_xio\_attr\_cntl** *.*

- *GLOBUS\_XIO\_FILE\_SET\_HANDLE*

  *See usage for:* **globus\_xio\_attr\_cntl** *.*

- *GLOBUS\_XIO\_FILE\_GET\_HANDLE*

  *See usage for:* **globus\_xio\_attr\_cntl** *,* **globus\_xio\_handle\_cntl** *.*

- *GLOBUS\_XIO\_FILE\_SET\_BLOCKING\_IO*

  *See usage for:* **globus\_xio\_attr\_cntl** *,* **globus\_xio\_handle\_cntl** *.*

- *GLOBUS\_XIO\_FILE\_GET\_BLOCKING\_IO*

  *See usage for:* **globus\_xio\_attr\_cntl** *,* **globus\_xio\_handle\_cntl** *.*

- *GLOBUS\_XIO\_FILE\_SEEK*

  *See usage for:* **globus\_xio\_handle\_cntl** *.*

## Function Documentation

### globus\_result\_t globus\_xio\_attr\_cntl (attr, driver, GLOBUS\_XIO\_FILE\_SET\_MODE, intmode)

*This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Set the file create mode. Use this to set the permissions a non-existent file is created with, The default mode is 0644.*

**Parameters:**

*mode A bitwise OR of all the modes desired*

**See also:**

**globus\_xio\_file\_mode\_t**

*string opt: mode=\<int\>*

### globus\_result\_t globus\_xio\_attr\_cntl (attr, driver, GLOBUS\_XIO\_FILE\_GET\_MODE, int \*mode\_out)

*This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Get the file create mode.* **Parameters:**

*mode\_out The current mode will be stored here.*

### globus\_result\_t globus\_xio\_attr\_cntl (attr, driver, GLOBUS\_XIO\_FILE\_SET\_FLAGS, intflags)

*This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Set the file open flags. The default flags specify to create the file if it doesn't exist, open it for reading and writing, and interpret it as a binary file.*

**Parameters:**

*flags A bitwise OR of all the flags desired*

**See also:**

**globus\_xio\_file\_flag\_t**

*string opt: flags=\<int\>*

### globus\_result\_t globus\_xio\_attr\_cntl (attr, driver, GLOBUS\_XIO\_FILE\_GET\_FLAGS, int \*flags\_out)

*This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Get the file open flags.* **Parameters:**

*flags\_out The current flags will be stored here.*

### globus\_result\_t globus\_xio\_attr\_cntl (attr, driver, GLOBUS\_XIO\_FILE\_SET\_TRUNC\_OFFSET, globus\_off\_toffset)

*This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Set the file truncate offset. Use this in conjunction with the* **GLOBUS\_XIO\_FILE\_TRUNC** *flag to truncate a file to a non-zero offset. If the file was larger than offset bytes, the extra data is lost. If the file was shorter or non-existent, it is extended and the extended part reads as zeros. (default is 0)*

**Parameters:**

*offset The desired size of the file.*

### globus\_result\_t globus\_xio\_attr\_cntl (attr, driver, GLOBUS\_XIO\_FILE\_GET\_TRUNC\_OFFSET, globus\_off\_t \*offset\_out)

*This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Get the file truncate offset.* **Parameters:**

*offset\_out The offset will be stored here.*

### globus\_result\_t globus\_xio\_attr\_cntl (attr, driver, GLOBUS\_XIO\_FILE\_SET\_HANDLE, globus\_xio\_system\_file\_thandle)

*This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Set the file handle to use. Do not open a new file, use this preopened handle instead.*

**Parameters:**

*handle Use this handle (fd or HANDLE) for the file. Note: close() will not be called on this handle.*

### globus\_result\_t globus\_xio\_attr\_cntl (attr, driver, GLOBUS\_XIO\_FILE\_GET\_HANDLE, globus\_xio\_system\_file\_t \*handle\_out)

*This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Get the file handle in use or in attr.* **Parameters:**

*handle\_out The file handle (fd or HANDLE) will be stored here. If none is set, GLOBUS\_XIO\_TCP\_INVALID\_HANDLE will be set.*

### globus\_result\_t globus\_xio\_handle\_cntl (handle, driver, GLOBUS\_XIO\_FILE\_GET\_HANDLE, globus\_xio\_system\_file\_t \*handle\_out)

*This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Get the file handle in use or in attr.* **Parameters:**

*handle\_out The file handle (fd or HANDLE) will be stored here. If none is set, GLOBUS\_XIO\_TCP\_INVALID\_HANDLE will be set.*

### globus\_result\_t globus\_xio\_attr\_cntl (attr, driver, GLOBUS\_XIO\_FILE\_SET\_BLOCKING\_IO, globus\_bool\_tuse\_blocking\_io)

*This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Enable true blocking io when making globus\_xio\_read/write() calls. Note: use with caution. you can deadlock an entire app with this.*

**Parameters:**

*use\_blocking\_io If GLOBUS\_TRUE, true blocking io will be enabled. GLOBUS\_FALSE will disable it (default);*

### globus\_result\_t globus\_xio\_handle\_cntl (handle, driver, GLOBUS\_XIO\_FILE\_SET\_BLOCKING\_IO, globus\_bool\_tuse\_blocking\_io)

*This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Enable true blocking io when making globus\_xio\_read/write() calls. Note: use with caution. you can deadlock an entire app with this.*

**Parameters:**

*use\_blocking\_io If GLOBUS\_TRUE, true blocking io will be enabled. GLOBUS\_FALSE will disable it (default);*

### globus\_result\_t globus\_xio\_attr\_cntl (attr, driver, GLOBUS\_XIO\_FILE\_GET\_BLOCKING\_IO, globus\_bool\_t \*use\_blocking\_io\_out)

*This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Get the blocking io status in use or in attr.* **Parameters:**

*use\_blocking\_io\_out The flag will be set here. GLOBUS\_TRUE for enabled.*

*string opt: blocking=\<bool\>*

### globus\_result\_t globus\_xio\_handle\_cntl (handle, driver, GLOBUS\_XIO\_FILE\_GET\_BLOCKING\_IO, globus\_bool\_t \*use\_blocking\_io\_out)

*This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Get the blocking io status in use or in attr.* **Parameters:**

*use\_blocking\_io\_out The flag will be set here. GLOBUS\_TRUE for enabled.*

*string opt: blocking=\<bool\>*

### globus\_result\_t globus\_xio\_handle\_cntl (handle, driver, GLOBUS\_XIO\_FILE\_SEEK, globus\_off\_t \*in\_out\_offset, globus\_xio\_file\_whence\_twhence)

*This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Reposition read/write file offset.* **Parameters:**

*in\_out\_offset Specify the desired offset (according to whence). On success, the actual file offset will be stored here.*\
 *whence Specify how offset should be interpreted.*

**See also:**

**globus\_xio\_file\_whence\_t**

**GLOBUS\_XIO\_SEEK**

## Author

*Generated automatically by Doxygen for globus xio from the source code.*
