Skip to content

FileWhence

Description

Whence values for FileSeek. SET anchors to the file start, CUR to the current position, END to the file end.

Usage example (Cross-references)

Usage examples (Cross-references)
        FILE_SEEK_CUR = 1,
        FILE_SEEK_END = 2,
    } FileWhence;
    
    // File API path-arg dispatch. `Str *` is the canonical Str form;
    /// TAGS: File, Seek, Position
    ///
    i64 FileSeek(File *f, i64 offset, FileWhence whence);
    
    ///
    }
    
    i64 FileSeek(File *f, i64 offset, FileWhence whence) {
        if (!FileIsOpen(f)) {
            return -1;
Last updated on