# fileFlush (Compartilhado)

> Grava no disco o que foi escrito no arquivo e ainda está em memória.

- **Plataforma**: MY Multiplayer (MYMP)
- **Tipo**: Função Lua
- **Lado**: Compartilhado
- **Categoria**: Arquivos
- **URL**: https://wiki.mymp.gg/pt/fileFlush

## Sintaxe

```lua
bool fileFlush(file file)
```

## Parâmetros

| Nome | Tipo | Descrição |
| --- | --- | --- |
| `file` | `file` | Um arquivo aberto por `fileOpen` ou `fileCreate`. |

## Retorno

`true` se deu certo.

## Exemplo

```lua
fileWrite(log, "checkpoint\n")
fileFlush(log)
```

## Veja também

- [fileWrite (Compartilhado)](https://wiki.mymp.gg/pt/fileWrite.md): Escreve um ou mais textos num arquivo, na posição atual.
- [fileClose (Compartilhado)](https://wiki.mymp.gg/pt/fileClose.md): Fecha um arquivo, gravando o que falta, e destrói o elemento dele.
