VuoFileUtilitiesCocoa interface.
Definition in file VuoFileUtilitiesCocoa.hh.
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 onSameVolumeAsPath) |
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_getOSVersionMinor (void) |
Returns the minor component of the OS version. More... | |
void | VuoFileUtilitiesCocoa_setIcon (string filePath, string imagePath) |
Changes the Finder icon for a file or folder. More... | |
void | VuoFileUtilitiesCocoa_setBundle (string filePath) |
Indicates that Finder should treat this folder as a bundle. 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 131 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 93 of file VuoFileUtilitiesCocoa.mm.
int VuoFileUtilitiesCocoa_getOSVersionMinor | ( | void | ) |
Returns the minor component of the OS version.
Definition at line 141 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 217 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 46 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 24 of file VuoFileUtilitiesCocoa.mm.
string VuoFileUtilitiesCocoa_resolveMacAlias | ( | const string & | path | ) |
If path
is a macOS Alias, returns its target path.
VuoException |
Definition at line 257 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 160 of file VuoFileUtilitiesCocoa.mm.
void VuoFileUtilitiesCocoa_setIcon | ( | string | filePath, |
string | imagePath | ||
) |
Changes the Finder icon for a file or folder.
Definition at line 149 of file VuoFileUtilitiesCocoa.mm.