# pathIsFile (Compartilhado)

> Diz se um caminho é um arquivo. Faz o mesmo que `fileExists`.

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

## Sintaxe

```lua
bool pathIsFile(string path)
```

## Parâmetros

| Nome | Tipo | Descrição |
| --- | --- | --- |
| `path` | `string` | Um caminho dentro do recurso que chama, ou `@recurso/caminho` para um arquivo de outro recurso. |

## Retorno

`true` se o caminho existe e é um arquivo (não uma pasta).

## Exemplo

```lua
if pathIsFile("config.json") then
    local config = fromJSON(fileGetContents("config.json"))
end
```

## Veja também

- [pathIsDirectory (Compartilhado)](https://wiki.mymp.gg/pt/pathIsDirectory.md): Diz se um caminho é uma pasta.
- [fileExists (Compartilhado)](https://wiki.mymp.gg/pt/fileExists.md): Diz se um caminho é um arquivo. Faz o mesmo que pathIsFile.
