# fileGetPos (Shared)

> Returns a file's current read and write position.

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

## Syntax

```lua
int fileGetPos(file file)
```

## Parameters

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

## Returns

The position in bytes from the start.

## Example

```lua
print("at byte " .. fileGetPos(file))
```

## See also

- [fileSetPos (Shared)](https://wiki.mymp.gg/en/fileSetPos.md): Changes a file's read and write position.
- [fileIsEOF (Shared)](https://wiki.mymp.gg/en/fileIsEOF.md): Tells whether a file's position has reached its end.
