Commits

obscurestar committed bcf46a4

Some cocoa that doesn't work

Comments (0)

Files changed (2)

indra/llvfs/lldir_mac.cpp

 #include <boost/filesystem.hpp>
 
 #include <Carbon/Carbon.h>
+//#include "lldir_mac.mm"
+//
+//std::string getApplicationSupportFolder ()
+//{
+//    std::string support_folder_str;
+//    CFArrayRef a = appSupport();
+//    if (CFArrayGetCount(a) > 0) { 
+//        CFStringRef s = CFArrayGetValueAtIndex(a, 0);
+//        char path[PATH_MAX];
+//        CFStringGetFileSystemRepresentation(s, path, sizeof(path));
+//        support_folder_str = std::string(path);
+//    }
+//    CFRelease(a);
+//    return support_folder_str;
+//}
 
 // --------------------------------------------------------------------------------
 
 LLDir_Mac::LLDir_Mac()
 {
 	mDirDelimiter = "/";
-	mCurrentDirIndex = -1;
-	mCurrentDirCount = -1;
 	
 	CFBundleRef		mainBundleRef = NULL;
 	CFURLRef		executableURLRef = NULL;
 		mSkinBaseDir = mAppRODataDir + mDirDelimiter + "skins";
 	}
 	mCAFile = getExpandedFilename(LL_PATH_APP_SETTINGS, "CA.pem");
-
-	//dumpCurrentDirectories();
 }
 
 std::string LLDir_Mac::getCurPath()
 
 BOOL LLDir_Mac::fileExists(const std::string &filename) const
 {
-	struct stat stat_data;
-	// Check the age of the file
-	// Now, we see if the files we've gathered are recent...
-	int res = stat(filename.c_str(), &stat_data);
-	if (!res)
-	{
-		return TRUE;
-	}
-	else
-	{
-		return FALSE;
-	}
+    return boost::filesystem::exists(filename);
 }
 
 

indra/llvfs/lldir_mac.h

 
 	/*virtual*/ std::string getLLPluginLauncher();
 	/*virtual*/ std::string getLLPluginFilename(std::string base_name);
-
-private:
-	int mCurrentDirIndex;
-	int mCurrentDirCount;
-	std::string mCurrentDir;
 };
 
 #endif // LL_LLDIR_MAC_H