Where are my files created by IsolStorageFileStream?

I would like to debug the generated IsolatedStorageFileStreamxml file. Where can i find the file?

+3
source share
2 answers

I assume that after you checked the WP7 question, you are looking for a file on Windows Phone.

The only way to check the file at present is to read it through the SDK. You could do something like this, for example.

var stream = isoStore.OpenFile("whateverpathyou.gaveit",FileMode.Open);
var reader = new StreamReader(stream);
var output = reader.ReadToEnd();
System.Diagnostics.Debug.WriteLine(output);
+2
source

Physical location:

Windows 7/2008:

<SYSTEMDRIVE>\Users\<user>\Local Settings\Application Data\IsolatedStorage

Windows XP, Windows Server 2003:

<SYSTEMDRIVE>\Documents and Settings\<user>\Application Data\IsolatedStorage

Programmatic access (only checking the existence of the file, other examples are available from the link indicated at the end):

const string ISOLATED_FILE_NAME = "MyIsolatedFile.txt";

IsolatedStorageFile isoStore = 
  IsolatedStorageFile.GetStore( IsolatedStorageScope.User 
  | IsolatedStorageScope.Assembly, null, null );

string[] fileNames = isoStore.GetFileNames( ISOLATED_FILE_NAME );

foreach ( string file in fileNames )
{
    if ( file == ISOLATED_FILE_NAME )
    {
       Debug.WriteLine("The file already exists!");
    }
}

Extracted from:

http://www.codeproject.com/KB/dotnet/IsolatedStorage.aspx

+6

Source: https://habr.com/ru/post/1782462/


All Articles