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

前端 未结 10 2078
小鲜肉
小鲜肉 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 07:39

        Dim myPath As StorageFolder
        If (From i In Await KnownFolders.MusicLibrary.GetFoldersAsync() Where i.Name = "PodBong").Count = 1 Then
            myPath = Await KnownFolders.MusicLibrary.GetFolderAsync("PodBong")
        Else
            myPath = Await KnownFolders.MusicLibrary.CreateFolderAsync("PodBong")
    
        End If
    

提交回复
热议问题