Exemple #1
0
 public async Task <bool> FileExistsAsync(IPortableStorageFile file)
 {
     try
     {
         return(File.Exists(file.Path));
     }
     catch
     {
         return(false);
     }
 }
 public static IStorageFile AsWinRTStorageFile(this IPortableStorageFile file)
 {
     return(file.BaseFile as IStorageFile);
 }
Exemple #3
0
 public async Task DeleteFileAsync(IPortableStorageFile file)
 {
     await file.AsWinRTStorageFile().DeleteAsync(StorageDeleteOption.PermanentDelete);
 }