How to get the path to my app?

(in mac) something like:

l guess we can find it if we can get the app name?

string appname = ofSystem("ls ./");
string ret = ofSystem("find `pwd` -name " + appname);
vector <string> cleanString;
cleanString = ofSplitString(ret, "\n");
ret = cleanString[0];
ofLogNotice("getAppName()") << ret;

this works in mac

you can do:

string appname = ofFilePath::getFileName(ofFilePath::getExePath());

Thanks Arturo!
(Note: i think it might have changed now)

string appPath = ofFilePath::getAbsolutePath(ofFilePath::getCurrentExePath());