当我删除这样的文件时,它会引发异常:
值不在预期范围内。
当deleteasync
.
public static async Task DeleteFile(string fileName, string folderPath)
{
try
{
StorageFolder sf = await CheckFolder(folderPath);
StorageFile sfile = await sf.GetFileAsync(fileName);
if (sfile != null)
{
await sfile.DeleteAsync();
}
}
catch (Exception)
{
}
}