MeVisLabToolboxReference
|
00001 // **InsertLicense** code author="Felix Ritter" version="1.0" 00002 00006 00007 #ifndef __macFileManager_H 00008 #define __macFileManager_H 00009 #if defined(__APPLE__) 00010 00011 #include <string> 00012 00013 namespace macx { 00014 00016 class FileManager 00017 { 00018 public: 00019 00021 enum FMFolderType { 00022 // Local folder (All users of a single machine have access to these resources) 00023 LocalApplicationSupportFolder = 0x000, 00024 LocalPreferencesFolderType, 00025 LocalCachesFolderType, 00026 00027 // User folder (Read/write resources that are private to the user) 00028 UserDocumentsFolder = 0x100, 00029 UserDesktopFolder, 00030 UserDownloadsFolder, 00031 UserApplicationSupportFolder, 00032 UserPreferencesFolderType, 00033 UserCachesFolderType, 00034 }; 00035 00037 static std::string locateFolder(FMFolderType type); 00038 00040 static bool isFilePackageAtPath(const std::string &path); 00041 00043 static bool moveFileToTrash(const std::string &file); 00044 00047 static bool showFileInFileSystemBrowser(const std::string &file); 00048 00050 static std::string getItemUTI(const std::string &path); 00051 00053 static bool itemConformsToUTI(const std::string &path, const std::string &uti); 00054 }; 00055 00056 } 00057 00058 #endif // __APPLE__ 00059 #endif // __macFileManager_H