Folder Paths Win Mac

From Unify Community Wiki
Revision as of 10:46, 18 February 2012 by Tenebrous (Talk | contribs)

Jump to: navigation, search
Enum Name Mac Win
0 Desktop /Users/yourname/Desktop C:\Users\yourname\Desktop
2 Programs C:\Users\yourname\AppData\Roaming\Microsoft\Windows\Start Menu\Programs
5 Personal /Users/yourname C:\Users\yourname\Documents
5 MyDocuments /Users/yourname C:\Users\yourname\Documents
6 Favorites /Users/yourname/Library/Favorites C:\Users\yourname\Favorites
7 Startup C:\Users\yourname\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
8 Recent C:\Users\yourname\AppData\Roaming\Microsoft\Windows\Recent
9 SendTo C:\Users\yourname\AppData\Roaming\Microsoft\Windows\SendTo
11 StartMenu C:\Users\yourname\AppData\Roaming\Microsoft\Windows\Start Menu
13 MyMusic /Users/yourname/Music C:\Users\yourname\Music
16 DesktopDirectory /Users/yourname/Desktop C:\Users\yourname\Desktop
17 MyComputer
21 Templates /Users/yourname/Templates C:\Users\yourname\AppData\Roaming\Microsoft\Windows\Templates
26 ApplicationData /Users/yourname/.config C:\Users\yourname\AppData\Roaming
28 LocalApplicationData /Applications/Unity/MonoDevelop.app/Contents/MacOS/../Frameworks/Mono.framework/Versions/Current/share C:\Users\yourname\AppData\Local
32 InternetCache /Users/yourname/Library/Caches C:\Users\yourname\AppData\Local\Microsoft\Windows\Temporary Internet Files
33 Cookies C:\Users\yourname\AppData\Roaming\Microsoft\Windows\Cookies
34 History C:\Users\yourname\AppData\Local\Microsoft\Windows\History
35 CommonApplicationData /usr/share C:\ProgramData
37 System C:\Windows\system32
38 ProgramFiles /Applications C:\Program Files
or C:\Program Files (x86)
39 MyPictures /Users/yourname/Pictures C:\Users\yourname\Pictures
43 CommonProgramFiles C:\Program Files\Common Files
or C:\Program Files (x86)\Common Files

Code

Stand-alone

using System;
 
class Test
{
	static int Main(String[] argv)
	{
		var names = Enum.GetNames(typeof(Environment.SpecialFolder));
		var values = Enum.GetValues(typeof(Environment.SpecialFolder));
		for(int i = 0; i < names.Length; ++i)
			Console.WriteLine("{0} {1}: {2}", (int)values.GetValue(i), names[i], Environment.GetFolderPath((Environment.SpecialFolder)values.GetValue(i)));
 
		return 0;
	}
}


Inside Unity

var names = System.Enum.GetNames( typeof( System.Environment.SpecialFolder ) );
var values = System.Enum.GetValues( typeof( System.Environment.SpecialFolder ) );
for( int i = 0; i < names.Length; ++i )
    Debug.Log( (int)values.GetValue( i ) + " " + names[i] + ": " + System.Environment.GetFolderPath( (System.Environment.SpecialFolder)values.GetValue( i ) ) );


Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox