# pathIsDirectory (Shared)

> Tells whether a path is a folder.

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

## Syntax

```lua
bool pathIsDirectory(string path)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `path` | `string` | A path inside the calling resource, or `@resource/path` for another resource's file. |

## Returns

`true` if the path exists and is a folder.

## Example

```lua
if not pathIsDirectory("saves") then
    fileCreate("saves/.keep")
end
```

## See also

- [pathIsFile (Shared)](https://wiki.mymp.gg/en/pathIsFile.md): Tells whether a path is a file. It does the same as fileExists.
- [pathListDir (Shared)](https://wiki.mymp.gg/en/pathListDir.md): Lists what a folder holds.
