Search code examples
c#windows-phone-8isolatedstorage

How too look what is in the Isolated Storage (windows phone)?


how can i look, what i saved in the isloated storage untill now? i try to make a app where user can save more lists. And choose after that which List he wants to have and Display that.


Solution

  • There's a very handy tool for viewing the files currently in the isolated storage. Here's a link.

    However, if you're planning on doing this at runtime, then I would suggest checking the following tutorial from MSDN, here

    This method in particular may be what you are after.

    public static List<String> GetAllFiles(string pattern, IsolatedStorageFile storeFile)
    {
        // Get the root and file portions of the search string. 
        string fileString = Path.GetFileName(pattern);
    
        List<String> fileList = new List<String>(storeFile.GetFileNames(pattern));
    
        // Loop through the subdirectories, collect matches, 
        // and make separators consistent. 
        foreach (string directory in GetAllDirectories("*", storeFile))
        {
            foreach (string file in storeFile.GetFileNames(directory + "/" + fileString))
            {
                fileList.Add((directory + "/" + file));
            }
        }
    
        return fileList;
    }