summaryrefslogtreecommitdiffstats
path: root/mmc_updater/src/StandardDirs.mm
blob: 53eecd4716eb018f3b434d27b686d14ea369c0c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <Foundation/Foundation.h>

#include "StandardDirs.h"

std::string StandardDirs::applicationSupportFolderPath()
{
	NSArray* paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory,
	                   NSUserDomainMask,
	                   true /* expand tildes */);

	for (unsigned int i=0; i < [paths count]; i++)
	{
		NSString* path = [paths objectAtIndex:i];
		return std::string([path UTF8String]);
	}
	return std::string();
}