# FileExists

int FileExists (const char path[], int *fileSize);

## Purpose

Determines if a file with the specified pathname exists on disk.

## Parameters

Input
Name | Type | Description
path | const char [] | The pathname of a file. If it is not an absolute pathname, the pathname is relative to the current working directory.
Output
Name | Type | Description
fileSize | integer * | This parameter returns the size of the file in bytes if the file exists, or –1 if the file does not exist or an error occurred. Pass 0 if you do not need this information.

## Return Value

Name | Type | Description
result | integer | Returns 1 (TRUE) if the file exists. Returns 0 (FALSE) if the file was not found. Returns a negative User Interface Library error code if an error occurred. Possible errors:
–12 | UIEOutOfMemory
–93 | UIEIOError