Edit

Share via


StorageFileHelper.FileExistsAsync(StorageFolder, String, Boolean) Method

Definition

Gets a value indicating whether a file exists in the current folder.

public static System.Threading.Tasks.Task<bool> FileExistsAsync (this Windows.Storage.StorageFolder folder, string fileName, bool isRecursive = false);
static member FileExistsAsync : Windows.Storage.StorageFolder * string * bool -> System.Threading.Tasks.Task<bool>
<Extension()>
Public Function FileExistsAsync (folder As StorageFolder, fileName As String, Optional isRecursive As Boolean = false) As Task(Of Boolean)

Parameters

folder
Windows.Storage.StorageFolder

The Windows.Storage.StorageFolder to look for the file in.

fileName
String

The String filename of the file to search for. Must include the file extension and is not case-sensitive.

isRecursive
Boolean

The Boolean, indicating if the subfolders should also be searched through.

Returns

true if the file exists; otherwise, false.

Applies to