---
name: "al_fseek"
section: "3alleg5"
platform: "linux"
package: "allegro5-doc"
version: "2:5.2.10.1+dfsg-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/al_fseek/3alleg5"
---

# al\_fseek(3alleg5)

Allegro 5 API

## NAME

al\_fseek - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro.h>
  bool al_fseek(ALLEGRO_FILE *f, int64_t offset, int whence)
  ```

## DESCRIPTION

Set the current position of the given file to a position relative to that specified by \`whence', plus \`offset' number of bytes.

\`whence' can be:

- •

  ALLEGRO\_SEEK\_SET - seek relative to beginning of file

- •

  ALLEGRO\_SEEK\_CUR - seek relative to current file position

- •

  ALLEGRO\_SEEK\_END - seek relative to end of file

Returns true on success, false on failure. errno is set to indicate the error.

After a successful seek, the end-of-file indicator is cleared and all pushback bytes are forgotten.

On some platforms this function may not support large files.

## SEE ALSO

al\_ftell(3alleg5), al\_get\_errno(3alleg5)
