---
name: "getfile"
section: "3abz"
platform: "linux"
package: "libabz0-dev"
version: "0.5.1"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/getfile"
---

# getfile(3abz)

read a file into a buffer.

## NAME

getfile - read a file into a buffer.

## LIBRARIES

Abz Library (-labz), Debug Library (-ldebug)

## SYNOPSIS

```
#include <abz/getfile.h>

void *getfile(const char *filename, size_t *count);
```

## DESCRIPTION

The **getfile()** function reads an entire file into a buffer.

## RETURN VALUE

The **getfile()** function returns the buffer (and sets count to the size of the buffer) or NULL if an error occurred.

Check *errno* to see what error occurred.

## NOTES

None of the libabz routines are thread-safe. I'm not planning to change this either! For more information, please see http://threading.2038bug.com/

## AUTHOR

Written by Abraham vd Merwe \<abz@blio.com\>
