Table of Contents

Method FileExists

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

FileExists(string?)

Gets whether the specified file exists.

public virtual bool FileExists(string? path)

Parameters

path string

The file to check.

Returns

bool

true if the caller has the required permissions and path contains the name of an existing file; otherwise, false. Also returns false if path is null, an invalid path, or a zero-length string. If the caller does not have sufficient permissions to read the specified file, no exception is thrown and the method returns false regardless of the existence of file.