# PathExists

> Checks if the specified path exists. The path can represent a file path or a directory path.

Checks if the specified path exists. The path can represent a file path or a directory path.

## Definition

**Namespace:** UiPath.Activities.System.API

**Assembly:** UiPath.System.Activities.Api (in UiPath.System.Activities.Api.dll)

## Overloads

|  |  |
| --- | --- |
| `PathExists(String)` | Checks if the inputted path exists. |
| `PathExists(String, PathType)` | Checks if the inputted path and path type exist. |
| `PathExists(String, ILocalResource)` | Checks if the inputted path and reference to it exist. |
| `PathExists(String, PathType, ILocalResource)` | Checks if the inputted path, path type, and reference to it exist. |

## `PathExists(String)`

Checks if the inputted path exists.

```
bool PathExists(
    string path
)
```

`path` [String](https://learn.microsoft.com/dotnet/api/system.string) : The full path to be checked.

## `PathExists(String, PathType)`

Checks if the inputted path and path type exist.

```
bool PathExists(
    string path,
    PathType pathType
)
```

`path` [String](https://learn.microsoft.com/dotnet/api/system.string) : The full path to be checked.

`pathType` `PathType` : Checks if the specified path exists. The path can be to either a file, or a directory.

## `PathExists(String, ILocalResource)`

Checks if the inputted path and reference to it exist.

```
bool PathExists(
    string path,
    out ILocalResource resource
)
```

`path` [String](https://learn.microsoft.com/dotnet/api/system.string) : The full path to be checked.

`resource` `ILocalResource` : Reference if path exists.

## `PathExists(String, PathType, ILocalResource)`

Checks if the inputted path, path type, and reference to it exist.

```
bool PathExists(
    string path,
    PathType pathType,
    out ILocalResource resource
)
```

`path` [String](https://learn.microsoft.com/dotnet/api/system.string) : The full path to be checked.

`pathType` `PathType` : Checks if the specified path exists. The path can be to either a file, or a directory.

`resource` `ILocalResource` : Reference if path exists.

## Return value

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

States if the document or file was found.
