MeVisLab Toolbox Reference
|
File operations. More...
#include <macFileManager.h>
Public Types | |
enum | FMFolderType { LocalApplicationSupportFolder = 0x000 , LocalPreferencesFolderType , LocalCachesFolderType , UserDocumentsFolder = 0x100 , UserDesktopFolder , UserDownloadsFolder , UserApplicationSupportFolder , UserPreferencesFolderType , UserCachesFolderType } |
Specifies the different folder types. More... | |
Static Public Member Functions | |
static std::string | locateFolder (FMFolderType type) |
Obtains location information for system-related directories (UTF8) More... | |
static std::string | getUserTemporaryItemsFolder () |
Returns the path of the temporary directory for the current user (UTF8) More... | |
static bool | isFilePackageAtPath (const std::string &path) |
Determines whether the specified path points to a file package (UTF8) More... | |
static bool | moveItemToTrash (const std::string &file, bool hidden=true) |
The item is moved to the trash folder on the volume containing the item. Returns 'true' if successful (UTF8) More... | |
static bool | authorizeAndCopyItem (const std::string &src, const std::string &dst) |
Request authorization to elevate privileges and copy item (UTF8, macOS 10.14) More... | |
static bool | authorizeAndInstallItem (const std::string &src, const std::string &dst) |
Request authorization to elevate privileges and install item (UTF8) More... | |
static bool | showItemInFileSystemBrowser (const std::string &file) |
Activates the Finder and opens one window selecting the specified item. More... | |
static std::string | getItemUTI (const std::string &path) |
Returns the Uniform Type Identifier (UTI) of this filesystem item or an empty string (UTF8) More... | |
static bool | itemConformsToUTI (const std::string &path, const std::string &uti) |
Returns 'true' if the given filesystem item conforms to the specified Uniform Type Identifier (UTI) More... | |
File operations.
Definition at line 26 of file macFileManager.h.
Specifies the different folder types.
Enumerator | |
---|---|
LocalApplicationSupportFolder | Specifies the Application Support folder. This folder contains code and data files needed by third-party applications. |
LocalPreferencesFolderType | Specifies the Preferences folder. |
LocalCachesFolderType | Specifies the Caches folder (location of discardable cache files) |
UserDocumentsFolder | Specifies the Documents folder. |
UserDesktopFolder | Specifies the Desktop folder. |
UserDownloadsFolder | Specifies the Downloads folder. |
UserApplicationSupportFolder | Specifies the Application Support folder. This folder contains code and data files needed by third-party applications. |
UserPreferencesFolderType | Specifies the Preferences folder. |
UserCachesFolderType | Specifies the Caches folder (location of discardable cache files) |
Definition at line 31 of file macFileManager.h.
|
static |
Request authorization to elevate privileges and copy item (UTF8, macOS 10.14)
dst is the full name of the target file. The destination folder must exist
|
static |
Request authorization to elevate privileges and install item (UTF8)
dst is the full name of the target file. If the destination folder does not exist it is created
|
static |
Returns the Uniform Type Identifier (UTI) of this filesystem item or an empty string (UTF8)
|
static |
Returns the path of the temporary directory for the current user (UTF8)
|
static |
Determines whether the specified path points to a file package (UTF8)
|
static |
Returns 'true' if the given filesystem item conforms to the specified Uniform Type Identifier (UTI)
|
static |
Obtains location information for system-related directories (UTF8)
|
static |
The item is moved to the trash folder on the volume containing the item. Returns 'true' if successful (UTF8)
If hidden is false, the item is moved to the trash in the same manner as the Finder, possibly showing graphical feedback
|
static |
Activates the Finder and opens one window selecting the specified item.
If the item is a directory show the directory contents in Finder. Returns 'true' if successful (UTF8)