<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://csharpgamedev.com/w/index.php?action=history&amp;feed=atom&amp;title=Local_Directories</id>
	<title>Local Directories - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://csharpgamedev.com/w/index.php?action=history&amp;feed=atom&amp;title=Local_Directories"/>
	<link rel="alternate" type="text/html" href="https://csharpgamedev.com/w/index.php?title=Local_Directories&amp;action=history"/>
	<updated>2026-05-25T10:32:10Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://csharpgamedev.com/w/index.php?title=Local_Directories&amp;diff=67&amp;oldid=prev</id>
		<title>Winkio: Created page with &quot;To get to specific local directories on the system where a game is running  &lt;syntaxhighlight lang=&quot;cs&quot;&gt; Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) &lt;/syntaxhighlight&gt;  This works on multiple platforms, including windows, linux, mac, and android.  For example, if you wanted to create a folder under ‘My Games’ for a single game&#039;s save data, consider the following code:  &lt;syntaxhighlight lang=&quot;cs&quot;&gt; string gameName = &quot;Tetris&quot;; string userDirectory =...&quot;</title>
		<link rel="alternate" type="text/html" href="https://csharpgamedev.com/w/index.php?title=Local_Directories&amp;diff=67&amp;oldid=prev"/>
		<updated>2024-06-10T01:23:22Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;To get to specific local directories on the system where a game is running  &amp;lt;syntaxhighlight lang=&amp;quot;cs&amp;quot;&amp;gt; Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) &amp;lt;/syntaxhighlight&amp;gt;  This works on multiple platforms, including windows, linux, mac, and android.  For example, if you wanted to create a folder under ‘My Games’ for a single game&amp;#039;s save data, consider the following code:  &amp;lt;syntaxhighlight lang=&amp;quot;cs&amp;quot;&amp;gt; string gameName = &amp;quot;Tetris&amp;quot;; string userDirectory =...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;To get to specific local directories on the system where a game is running&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cs&amp;quot;&amp;gt;&lt;br /&gt;
Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This works on multiple platforms, including windows, linux, mac, and android.&lt;br /&gt;
&lt;br /&gt;
For example, if you wanted to create a folder under ‘My Games’ for a single game&amp;#039;s save data, consider the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cs&amp;quot;&amp;gt;&lt;br /&gt;
string gameName = &amp;quot;Tetris&amp;quot;;&lt;br /&gt;
string userDirectory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), &amp;quot;My Games&amp;quot;, gameName);&lt;br /&gt;
if (!Directory.Exists(userDirectory))&lt;br /&gt;
{&lt;br /&gt;
    Directory.CreateDirectory(userDirectory);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More information can be found at:&lt;br /&gt;
*https://learn.microsoft.com/en-us/dotnet/api/system.environment.getfolderpath?view=net-7.0&lt;br /&gt;
*https://learn.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/8.0/getfolderpath-unix&lt;br /&gt;
&lt;br /&gt;
[[Category:Files and Databases]]&lt;/div&gt;</summary>
		<author><name>Winkio</name></author>
	</entry>
</feed>