10-28-2017, 02:42 AM
The storage location should make no difference whatsoever. That link shows how to query for a list of files, but what I really want is to check if a single file exists (so that I can iterate over each file in the library to check for its existance). I suppose I could query for every file in the storage location (which could be a massive number of files if someone specified something like the entire C: drive), and then have to create a dictionary of file paths so that, for each file in the MobileSheets library, I can see if it exists in that dictionary. I don't know if that would be any faster, but it would definitely be a little more convoluted that just calling a file.Exists() type method, which is what I'm doing now. For each file, in order to check if it exists, you have to use the parent folder and call GetFileAsync(). This is a fairly slow operation, which is the problem. There is also a TryGetItemAsync, which I'm going to test to see if it's any faster, but I believe the difference is minimal.
As a side note, I just tested this on my PC with a library containing 632 songs, and the find missing files search returned in under 2 seconds. How long is it taking for you? That doesn't seem unreasonable.
Thanks,
Mike
As a side note, I just tested this on my PC with a library containing 632 songs, and the find missing files search returned in under 2 seconds. How long is it taking for you? That doesn't seem unreasonable.
Thanks,
Mike