# fileIsEOF (Shared)

> Tells whether a file's position has reached its end.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Shared
- **Category**: Files
- **URL**: https://wiki.mymp.gg/en/fileIsEOF

## Syntax

```lua
bool fileIsEOF(file file)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `file` | `file` | A file opened by `fileOpen` or `fileCreate`. |

## Returns

`true` if the position is at the end of the file.

## Example

```lua
while not fileIsEOF(file) do
    print(fileRead(file, 256))
end
```

## See also

- [fileRead (Shared)](https://wiki.mymp.gg/en/fileRead.md): Reads bytes from a file at the current position and moves the position on.
- [fileGetPos (Shared)](https://wiki.mymp.gg/en/fileGetPos.md): Returns a file's current read and write position.
