All Classes |Grouped Classes |Index

Function get_resourcedata

Returns the application resource data directory.

	static CL_String CL_Directory::get_resourcedata(
		const CL_StringRef & application_name,
		const CL_StringRef & data_dir_name = "Resources");

Detailed description:

In Windows, this function returns a data_dir_name subdirectory located at the executable. If the executable path is "C:\Program Files\My Application\MyApp.exe", then it will return the path "C:\Program Files\My Application\data_dir_name\".In OS X, this function returns a "Resources" subdirectory inside the application bundle. For example, if the application executable path is "/Applications/MyApplication.app/Contents/MacOS/MyApplication", then it will return "/Applications/MyApplication.app/Contents/Resources/". If the executable is not in an application bundle, it will use the same behavior as in Windows; that is, it will return a data_dir_name subdirectory next to the executable.In Linux, this function will return the directory "../share/application_name/" relative to the executable, so if it is locan &qun "/usr/bin" it will return "/usr/share/application_name/"