StorageFolder replacement for writting files to non isolated storage?

I am trying to code a simple helper that can open and write a file anywhere in the file system that permissions allow. An example of why I would want to do this is to put save games in the Docs folder instead of 20 layers inside of the ProgramData folder, which would be the case if I used IsolatedStorage.

I have some old windows code that used to work but I cannot find anyway replace StorageFolder which no longer exists. So does anyone have an alternative to StorageFolder, other than using IsolatedStorage?

` public static async Task writeStringToFile( string p_PathAndFile, String p_StringToWrite )

        // If there is no data then we exit:
        if( p_PathAndFile == null || p_StringToWrite == null )

        StorageFolder storageFolder = ApplicationData.Current.LocalFolder;
        Stream _TempStream = null;
        StreamWriter _TempTextFile = null;
        if (storageFolder != null) _TempStream = await storageFolder.OpenStreamForWriteAsync( p_PathAndFile, p_CreationOption );
        if ( _TempStream != null )
            _TempTextFile = new StreamWriter( _TempStream );
            await _TempTextFile.WriteAsync( p_StringToWrite );



It seems like you might be asking something more complicated, so please excuse me if I am way off… but do you mean how to save a file, say an XML or TXT, to some hard-drive address like C:\ThisFolder?

If what you want to do targets only Windows desktops, as it seems to be, you can try
Environment.SpecialFolder enum:

The way an OS stores data is different from one to another. And as Monogame is multiplaform it is a bit complicated to provide a robust solution for all.That’s partly the reason why StorageFolder is no more available.
For ex. :

MSDN has some nice examples to base your implementation on. Some even use the previously mentioned SpecialFolder enum to write to my documents.

A second note you should probably be using a try..catch block and calling Dispose() in finally or alternatively use the using statement.

Here is a very simple example that simply writes the file to the directory of the exe. There overloaded constructors of StreamWriter to set the folder path etc.

        using (TextWriter tw = new StreamWriter("settings.ini"))