VuoFileUtilitiesCocoa implementation.
Definition in file VuoFileUtilitiesCocoa.mm.
Go to the source code of this file.
Functions | |
void | VuoFileUtilitiesCocoa_moveFileToTrash (string filePath) |
Moves the specified file to the user's trash folder. More... | |
string | VuoFileUtilitiesCocoa_makeTmpDirOnSameVolumeAsPath (string path) |
Creates a new temporary directory, avoiding any name conflicts with existing files. More... | |
size_t | VuoFileUtilitiesCocoa_getAvailableSpaceOnVolumeContainingPath (string path) |
Returns the available space, in bytes, on the volume containing the specified path. More... | |
void | VuoFileUtilitiesCocoa_focusProcess (pid_t pid, bool force) |
Attempts to focus the specified pid (i.e., bring all its windows to the front and make one of them key). More... | |
int | VuoFileUtilitiesCocoa_getOSVersionMajor (void) |
Returns the major component of the OS version. More... | |
int | VuoFileUtilitiesCocoa_getOSVersionMinor (void) |
Returns the minor component of the OS version. More... | |
string | VuoFileUtilitiesCocoa_getArchitecture (void) |
Returns the current system's processor architecture. More... | |
void | VuoFileUtilitiesCocoa_setBundle (string filePath) |
Indicates that Finder should treat this folder as a bundle. More... | |
static CFURLRef | VuoFileUtilitiesCocoa_getCFURL (const string &path) |
Returns macOS's opaque data for an alias at path , or NULL if it isn't an alias. More... | |
static CFDataRef | VuoFileUtilitiesCocoa_getMacAliasData (const string &path) |
Returns macOS's opaque data for an alias at path , or NULL if it isn't an alias. More... | |
bool | VuoFileUtilitiesCocoa_isMacAlias (const string &path) |
Returns true if path is a macOS Alias (not to be confused with a POSIX symlink). More... | |
string | VuoFileUtilitiesCocoa_resolveMacAlias (const string &path) |
If path is a macOS Alias, returns its target path. More... | |
void VuoFileUtilitiesCocoa_focusProcess | ( | pid_t | pid, |
bool | force | ||
) |
Attempts to focus the specified pid
(i.e., bring all its windows to the front and make one of them key).
This function may only be called on the main thread.
Definition at line 130 of file VuoFileUtilitiesCocoa.mm.
string VuoFileUtilitiesCocoa_getArchitecture | ( | void | ) |
Returns the current system's processor architecture.
Definition at line 156 of file VuoFileUtilitiesCocoa.mm.
size_t VuoFileUtilitiesCocoa_getAvailableSpaceOnVolumeContainingPath | ( | string | path | ) |
Returns the available space, in bytes, on the volume containing the specified path.
path
should be an absolute POSIX path. Its last few path components needn't exist.
VuoException |
Definition at line 92 of file VuoFileUtilitiesCocoa.mm.
|
static |
Returns macOS's opaque data for an alias at path
, or NULL if it isn't an alias.
Definition at line 187 of file VuoFileUtilitiesCocoa.mm.
|
static |
Returns macOS's opaque data for an alias at path
, or NULL if it isn't an alias.
Definition at line 207 of file VuoFileUtilitiesCocoa.mm.
int VuoFileUtilitiesCocoa_getOSVersionMajor | ( | void | ) |
Returns the major component of the OS version.
Definition at line 140 of file VuoFileUtilitiesCocoa.mm.
int VuoFileUtilitiesCocoa_getOSVersionMinor | ( | void | ) |
Returns the minor component of the OS version.
Definition at line 148 of file VuoFileUtilitiesCocoa.mm.
bool VuoFileUtilitiesCocoa_isMacAlias | ( | const string & | path | ) |
Returns true if path
is a macOS Alias (not to be confused with a POSIX symlink).
VuoException |
Definition at line 222 of file VuoFileUtilitiesCocoa.mm.
string VuoFileUtilitiesCocoa_makeTmpDirOnSameVolumeAsPath | ( | string | path | ) |
Creates a new temporary directory, avoiding any name conflicts with existing files.
The temporary directory will be on the same filesystem as the specified path, to facilitate using rename()
(for example). onSameVolumeAsPath
needn't already exist.
Returns the path of the directory (without a trailing slash).
VuoException |
Definition at line 45 of file VuoFileUtilitiesCocoa.mm.
void VuoFileUtilitiesCocoa_moveFileToTrash | ( | string | filePath | ) |
Moves the specified file to the user's trash folder.
VuoException | The file couldn't be moved. |
Definition at line 23 of file VuoFileUtilitiesCocoa.mm.
string VuoFileUtilitiesCocoa_resolveMacAlias | ( | const string & | path | ) |
If path
is a macOS Alias, returns its target path.
VuoException |
Definition at line 237 of file VuoFileUtilitiesCocoa.mm.
void VuoFileUtilitiesCocoa_setBundle | ( | string | filePath | ) |
Indicates that Finder should treat this folder as a bundle.
(It automatically does this for folders ending in .app
, but not .fxplug
.)
Definition at line 169 of file VuoFileUtilitiesCocoa.mm.