Steamworks.SteamUser.GetUserDataFolder C# (CSharp) Method

GetUserDataFolder() public static method

get the local storage folder for current Steam account to write application data, e.g. save games, configs etc.

this will usually be something like "C:\Progam Files\Steam\userdata\<SteamID>\<AppID>\local"

public static GetUserDataFolder ( string &pchBuffer, int cubBuffer ) : bool
pchBuffer string
cubBuffer int
return bool
		public static bool GetUserDataFolder(out string pchBuffer, int cubBuffer) {
			InteropHelp.TestIfAvailableClient();
			IntPtr pchBuffer2 = Marshal.AllocHGlobal(cubBuffer);
			bool ret = NativeMethods.ISteamUser_GetUserDataFolder(pchBuffer2, cubBuffer);
			pchBuffer = ret ? InteropHelp.PtrToStringUTF8(pchBuffer2) : null;
			Marshal.FreeHGlobal(pchBuffer2);
			return ret;
		}