I’ve attended several WP7 training events now and have heard that we can store as much data in isolated storage as the phone can hold. Apps are not constrained to an arbitrary fixed amount or percentage of phone space. But how many files can it hold?
Regardless of file size, I figure the phone file system will only be able to address a certain number of files. So I started creating files. Looks like a single app can hold up to 16,352 files before exceptions are thrown.
Once the limit is hit you start receiving the following generic exception:
For further information, I consulted the immediate window but didn’t get much more:
I verified that I could still create new files in a second app after the first was full.
What about directories, you say? Well that was my second question. It appears the 16,352 limit is per folder and its not only files, its 16,352 files or folders in a folder.
Here you see I added more than 16,000 files spread across two folders.
The last question was how many directories deep can I go? That would be 18. After which, I hit the same IsolatedStorageException as above for files. So in theory, this means we could store up to 16352^18 files/folders, that’s
This probably isn’t all that useful but it is interesting. Also interesting, I only noticed a slight slow down in the emulator after adding 16,000+ files to root. Nice to know.