|
| const std::string | extension (const std::string &file) |
| int32 | size (const std::string &file_path) |
| bool | is_dir (const std::string &file_path) |
| | Test for the existence of a directory.
|
| bool | is_file (const std::string &file_path) |
| bool | exists (const std::string &file_path) |
| const std::string | path (const std::string &dir_path) |
| | Extract the directory portion of a pathname.
|
| std::string | currentPath (void) |
| bool | set_path (const std::string &path) |
| const std::string | basename (const std::string &filename) |
| std::vector< std::string > | read_dir (const std::string &dir_path) |
| | Get a list of file entries within a directory.
|
| const std::string | resource_path (const std::string &identifier="\0") |
| | Get the path to the Resources folder within a bundle.
|
| const std::string | user_documents_path (void) |
| | Get the path to the logged in user's Documents folder.
|
| const std::string | user_app_support_path (void) |
| | Get the path to the logged in user's Application Support folder.
|
| const std::string | user_home_path (void) |
| | Get the current user's home directory path.
|
| const std::string | system_path (void) |
| | Get the platform-defined system path.
|
| bool | mkdir (const std::string &path) |
| | Create a directory entry.
|
| bool | recursive_mkdir (const std::string &path) |
| | Create directories recursively.
|
| bool | rmdir (const std::string &path) |
| | Remove a directory entry.
|
| bool | mkfile (const std::string &path) |
| | Create a file (zero bytes).
|
| std::string | env (const std::string &path) |
| | Get the value of an environment variable.
|
| nom::size_type | num_files (const std::string &path) |
| | Get the total number of files in a directory.
|
| const std::string nom::UnixFile::resource_path |
( |
const std::string & | identifier = "\0" | ) |
|
|
virtual |
Get the path to the Resources folder within a bundle.
The bundle's identifier can be found within the Info.plist file of said bundle, and typically is in reverse DNS notation. The string might look something like this:
org.dev.nomlib
or, as per the official API documentation,
com.apple.Finder.MyGetInfoPlugIn
The one restriction you have in using this function call is that the bundle whose identifier you have passed must already be loaded into the application bundle, or else this function call will fail.
- Returns
- A null-terminated string on err.
Implements nom::IFile.