gfal_lseek_python(3) - Linux man page

Name

gfal_lseek - position a file

Synopsis

import gfal

off_t gfal_lseek (int fd, long offset, int whence);

off64_t gfal_lseek64 (int fd, long offset, int whence);

Description

gfal_lseek positions/repositions to offset the file associated with the descriptor fd generated by a previous gfal_open. whence indicates how to interpret the offset value:
gfal.SEEK_SET
The offset is set from beginning of file.
gfal.SEEK_CUR
The offset is added to current position.
gfal.SEEK_END
The offset is added to current file size.

gfal_lseek64 performs the same function on large files using off64_t rather than off_t.

Return Value

This routine returns the actual offset from the beginning of the file if the operation was successful or -1 if the operation failed. In the latter case, errno is set appropriately.

Errors

EBADF
fd is not a valid file descriptor.
EINVAL
incorrect value for whence.
EFBIG
Resulting offset is too big to fit in off_t.
ECOMM
Communication error.
EPROTONOSUPPORT
Access method not supported.

See Also

gfal_python(3), gfal_init_python(3), gfal_internal_free_python(3), gfal_deletesurls_python(3), gfal_removedir_python(3), gfal_get_python(3), gfal_getstatus_python(3), gfal_ls_python(3), gfal_pin_python(3), gfal_prestage_python(3), gfal_prestagestatus_python(3), gfal_release_python(3), gfal_abortrequest_python(3), gfal_abortfiles_python(3), gfal_set_xfer_done_python(3), gfal_set_xfer_running_python(3), gfal_turlsfromsurls_python(3), gfal_get_ids_python(3), gfal_set_ids_python(3), gfal_get_results_python(3), gfal_access_python(3), gfal_chmod_python(3), gfal_close_python(3), gfal_closedir_python(3), gfal_creat_python(3), gfal_get_timeout_connect_python(3), gfal_get_timeout_sendreceive_python(3), gfal_get_timeout_bdii_python(3), gfal_get_timeout_srm_python(3), gfal_set_timeout_connect_python(3), gfal_set_timeout_sendreceive_python(3), gfal_set_timeout_bdii_python(3), gfal_set_timeout_srm_python(3), gfal_lseek_python(3), gfal_mkdir_python(3), gfal_open_python(3), gfal_opendir_python(3), gfal_read_python(3), gfal_rename_python(3), gfal_rmdir_python(3), gfal_stat_python(3), gfal_unlink_python(3), gfal_write_python(3), gfal_set_verbose_python(3), gfal_get_errno_python(3),

Referenced By

gfal_bringonline_python(3)