@get


Description:

[ Version ( since = "2.24" ) ]
public int @get (int index_) throws Error

Gets a file descriptor out of this.

index_ specifies the index of the file descriptor to get. It is a programmer error for index_ to be out of range. Either use [method@Gio.UnixFDList.lookup] to do a checked lookup, or check the index against the list length using [ method@Gio.UnixFDList.get_length].

The file descriptor is duplicated using `dup()` and set as close-on-exec before being returned. You must call `close()` on it when you are done.

A possible cause of failure is exceeding the per-process or system-wide file descriptor limit.

Parameters:

this

a [method@Gio.UnixFDList.get]

index_

the index into the list

Returns:

the file descriptor, or `-1` in case of error