Folder utilities: common folder support functions. More...
Go to the source code of this file.
Enumerations | |
enum | qsc_folderutils_directories { qsc_folderutils_directories_user_app_data = 0x00U , qsc_folderutils_directories_user_desktop = 0x01U , qsc_folderutils_directories_user_documents = 0x02U , qsc_folderutils_directories_user_downloads = 0x03U , qsc_folderutils_directories_user_favourites = 0x04U , qsc_folderutils_directories_user_music = 0x05U , qsc_folderutils_directories_user_pictures = 0x06U , qsc_folderutils_directories_user_programs = 0x07U , qsc_folderutils_directories_user_shortcuts = 0x08U , qsc_folderutils_directories_user_videos = 0x09U } |
The system special folders enumeration. More... | |
Functions | |
QSC_EXPORT_API void | qsc_folderutils_append_delimiter (char path[QSC_SYSTEM_MAX_PATH]) |
Append a folder path delimiter. | |
QSC_EXPORT_API bool | qsc_folderutils_create_directory (const char path[QSC_SYSTEM_MAX_PATH]) |
Create a new folder. | |
QSC_EXPORT_API bool | qsc_folderutils_delete_directory (const char path[QSC_SYSTEM_MAX_PATH]) |
Delete a folder. | |
QSC_EXPORT_API bool | qsc_folderutils_directory_exists (const char path[QSC_SYSTEM_MAX_PATH]) |
Check if a folder exists. | |
QSC_EXPORT_API size_t | qsc_folderutils_directory_list (char *result, size_t reslen, const char *directory) |
Write a list of directories to a string, delineated by newline characters. | |
QSC_EXPORT_API void | qsc_folderutils_get_directory (qsc_folderutils_directories directory, char output[QSC_SYSTEM_MAX_PATH]) |
Get the full path to a special system folder. | |
QSC_EXPORT_API bool | qsc_folderutils_directory_has_delimiter (const char path[QSC_SYSTEM_MAX_PATH]) |
Check if the folder path ends in a delimiter. | |
Folder utilities: common folder support functions.
This file provides a suite of functions for performing operations on folders such as:
The system special folders enumeration.
QSC_EXPORT_API void qsc_folderutils_append_delimiter | ( | char | path[QSC_SYSTEM_MAX_PATH] | ) |
Append a folder path delimiter.
Appends a directory delimiter to the provided path string if it is not already present.
path | [char*] The full path including the new folder name. |
QSC_EXPORT_API bool qsc_folderutils_create_directory | ( | const char | path[QSC_SYSTEM_MAX_PATH] | ) |
Create a new folder.
Creates a directory at the specified path.
path | [const char*] The full path including the new folder name. |
QSC_EXPORT_API bool qsc_folderutils_delete_directory | ( | const char | path[QSC_SYSTEM_MAX_PATH] | ) |
Delete a folder.
Deletes the directory at the specified path.
path | [const char*] The full path including the folder name. |
QSC_EXPORT_API bool qsc_folderutils_directory_exists | ( | const char | path[QSC_SYSTEM_MAX_PATH] | ) |
Check if a folder exists.
Checks whether the specified folder exists.
path | [const char*] The full path including the folder name. |
QSC_EXPORT_API bool qsc_folderutils_directory_has_delimiter | ( | const char | path[QSC_SYSTEM_MAX_PATH] | ) |
Check if the folder path ends in a delimiter.
Determines whether the provided folder path string ends with a directory delimiter.
path | [const char*] The full path including the folder name. |
QSC_EXPORT_API size_t qsc_folderutils_directory_list | ( | char * | result, |
size_t | reslen, | ||
const char * | directory ) |
Write a list of directories to a string, delineated by newline characters.
Constructs a string listing the directories within the specified starting directory.
result | [char*] The output result string. |
reslen | [size_t] The length of the output string buffer. |
directory | [const char*] The starting directory. |
QSC_EXPORT_API void qsc_folderutils_get_directory | ( | qsc_folderutils_directories | directory, |
char | output[QSC_SYSTEM_MAX_PATH] ) |
Get the full path to a special system folder.
Retrieves the full directory path corresponding to the given special folder enumeration.
directory | [qsc_folderutils_directories] The enum value of the system folder. |
output | [char*] The output string containing the directory path. |