Related to #457.
In the task snippets repository, there's a snippet to determine whether a file exists or not. This could be really useful for the StorageFileHelper.
Nice, although I think these should be extension methods if we do add them.
I think we should do both, usually there are case of user checking for a file existence before loading it in, and case of re-verification after doing something with the StorageFile.
I don't think that's what Scott was saying when he meant that they should be an extension method.
An extension method just allows you to say...
bool exists = folder.FileExistsAsync("Tacos.txt");
In addition to
bool exists = StorageHelper.FileExistsAsync(folder, "Tacos.txt");
You don't lose anything with an extension method, it just optionally makes the API call cleaner, since it acts as if the folder itself actually has a "FileExists" method.
Quite different than what I had in mind previously. The name of "StorageFileHelper" threw me off a bit if we are talking about checking a file within a given folder, not a file just by itself via string or Uri
Ah. Well I think no matter what, you'll always need a StorageFolder for reference, since Windows has the LocalFolder, LocalCacheFolder, RoamingFolder, TemporaryFolder... so the dev always needs to provide "I want to look in the RoamingFolder, and see if file XYZ exists"
Most helpful comment
Nice, although I think these should be extension methods if we do add them.