.\" This manpage is Copyright (C) 2016 MongoDB, Inc. .\" .\" Permission is granted to copy, distribute and/or modify this document .\" under the terms of the GNU Free Documentation License, Version 1.3 .\" or any later version published by the Free Software Foundation; .\" with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. .\" A copy of the license is included in the section entitled "GNU .\" Free Documentation License". .\" .TH "MONGOC_GRIDFS_FILE_SEEK" "3" "2016\(hy10\(hy12" "MongoDB C Driver" .SH NAME mongoc_gridfs_file_seek() \- Adjust the file position pointer in the given file by delta, starting from the position whence. The whence argument is interpreted as in fseek(2): .SH "SYNOPSIS" .nf .nf int mongoc_gridfs_file_seek (mongoc_gridfs_file_t *file, int64_t delta, int whence); .fi .fi .SH "PARAMETERS" .TP .B file A .B mongoc_gridfs_file_t . .LP .TP .B delta The amount to move the file position. May be positive or negative. .LP .TP .B whence One of SEEK_SET, SEEK_CUR or SEEK_END. .LP .SH "DESCRIPTION" Adjust the file position pointer in the given file by .B delta , starting from the position .B whence . The .B whence argument is interpreted as in .B fseek(2) : .TP .B .B SEEK_SET Set the position relative to the start of the file. .LP .TP .B .B SEEK_CUR Move .B delta relative to the current file position. .LP .TP .B .B SEEK_END Move .B delta relative to the end of the file. .LP On success, the file's underlying position pointer is set appropriately. On failure, the file position is NOT changed and errno is set to indicate the error. .SH "ERRORS" .TP .B .B EINVAL .B whence is not one of SEEK_SET, SEEK_CUR or SEEK_END. .LP .TP .B .B EINVAL The resulting file position would be negative. .LP .SH "RETURNS" Returns 0 if successful; otherwise \(hy1 and errno is set. .B .SH COLOPHON This page is part of MongoDB C Driver. Please report any bugs at https://jira.mongodb.org/browse/CDRIVER.