• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Find Missing Files
#4
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
Reply


Messages In This Thread
Find Missing Files - by itsme - 10-27-2017, 07:23 AM
RE: Find Missing Files - by Zubersoft - 10-27-2017, 05:13 PM
RE: Find Missing Files - by itsme - 10-27-2017, 07:25 PM
RE: Find Missing Files - by Zubersoft - 10-28-2017, 02:42 AM
RE: Find Missing Files - by Zubersoft - 10-29-2017, 09:34 AM
RE: Find Missing Files - by Geoff Bacon - 10-30-2017, 04:17 AM
RE: Find Missing Files - by itsme - 10-30-2017, 08:50 AM
RE: Find Missing Files - by itsme - 10-30-2017, 09:24 AM
RE: Find Missing Files - by itsme - 10-30-2017, 09:31 AM
RE: Find Missing Files - by Zubersoft - 10-30-2017, 12:34 PM
RE: Find Missing Files - by itsme - 10-30-2017, 04:09 PM
RE: Find Missing Files - by itsme - 10-30-2017, 04:14 PM
RE: Find Missing Files - by itsme - 10-30-2017, 04:27 PM
RE: Find Missing Files - by Zubersoft - 10-30-2017, 06:45 PM
RE: Find Missing Files - by itsme - 11-01-2017, 03:13 PM
RE: Find Missing Files - by Zubersoft - 11-01-2017, 03:50 PM
RE: Find Missing Files - by itsme - 11-02-2017, 08:17 AM
RE: Find Missing Files - by itsme - 11-15-2017, 08:50 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.