---
name: "file_size_ex"
section: "3alleg4"
platform: "linux"
package: "allegro4-doc"
version: "2:4.4.3.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/file_size_ex/3alleg4"
---

# file\_size\_ex(3alleg4)

Returns the size of a file in bytes. Allegro game programming library.

## NAME

file\_size\_ex - Returns the size of a file in bytes. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**uint64\_t file\_size\_ex(const char \*filename);**

## DESCRIPTION

Returns the size of a file, in bytes. If the file does not exist or an  error occurs, it will return zero and store the system error code in  errno.

## SEE ALSO

**file\_exists**(3alleg4), **file\_time**(3alleg4), **expackf**(3alleg4)
