How to check if file exists in a Windows Store App?

前端 未结 10 2088
小鲜肉
小鲜肉 2020-11-30 07:25

Is there any other way of checking whether a file exists in a Windows Store app?

try
{
    var file = await ApplicationData.Current.LocalFolder.GetFileAsync(         


        
10条回答
  •  广开言路
    2020-11-30 08:00

    The documentation for TryGetItemAsync says, "This example shows how to checkfor the existence of a file." It seems that this API is officially intended to serve that purpose.

提交回复
热议问题