 |
Blamite Game Engine - Strings
00402.09.29.23.0627.blamite
A library containing general purpose utilities and classes for use in multiple projects.
|
Go to the documentation of this file.
6 #define STRINGS_API __declspec(dllexport)
8 #define STRINGS_API __declspec(dllimport)
STRINGS_API std::string GetApplicationDir()
Retrieves the application's working directory.
Definition: io.cpp:115
STRINGS_API std::vector< std::string > Split(std::string string, std::string splitter)
Splits a string around any instance of a substring.
Definition: string.cpp:136
STRINGS_API std::vector< std::string > GetDirectoryList(std::string path)
Retrieves the list of all folders in the root of a given directory.
Definition: io.cpp:206
STRINGS_API std::string GetFileExtension(std::string path)
Retrieves the extension of a file.
Definition: io.cpp:322
STRINGS_API bool Contains(std::string string, std::string contains)
Determines whether or not a string contains the specified substring.
Definition: string.cpp:181
STRINGS_API std::vector< std::string > GetDeepFileList(std::string path)
Retrieves the list of all files within a given directory.
Definition: io.cpp:234
STRINGS_API void LogEvent(BlamBasicLogMessage message)
Logs an event to the logger.
Definition: logger.cpp:41
Utilities relating to reading/writing to and from files.
Definition: io.h:14
STRINGS_API std::string GetAbsolutePathFromRelative(std::string relative_path)
Converts a relative path to an absolute file path.
Definition: io.cpp:389
STRINGS_API bool CreateNewFile(std::string filename, std::string file_contents)
Creates a file with the specified contents, or overwrites an existing file if it already exists.
Definition: io.cpp:76
STRINGS_API std::string GetEngineDataRoot()
Retrieves the root folder for all game engine and editing kit user data files.
Definition: io.cpp:371
STRINGS_API std::string Replace(std::string orig, std::string to_replace, std::string replace_with)
Replaces part of a string with another string.
Definition: string.cpp:94
STRINGS_API std::vector< std::string > GetFileList(std::string path)
Retrieves the list of all files in a given directory.
Definition: io.cpp:178
STRINGS_API bool IsDirectory(std::string path)
Checks if a given path refers to a directory.
Definition: io.cpp:59
STRINGS_API std::string GetFileName(std::string path)
Retrieves the name of the file or folder that a given path refers to.
Definition: io.cpp:287
STRINGS_API std::string GetFileContentsAsString(std::string path)
Reads a file as a string.
Definition: io.cpp:138
STRINGS_API std::string NormalizePath(std::string path)
Normalizes a path string.
Definition: io.cpp:270
STRINGS_API bool IsFile(std::string path)
Checks if a given path refers to a regular file.
Definition: io.cpp:42
STRINGS_API std::string GetFileNameWithoutExtension(std::string path)
Retrieves the name of the file or folder that a given path refers to, excluding the file's extension ...
Definition: io.cpp:310
STRINGS_API bool FileExists(std::string name)
Checks if the specified file or directory exists.
Definition: io.cpp:26
STRINGS_API void OpenGameDirectory()
Opens the engine's game directory in Windows Explorer.
Definition: io.cpp:108
STRINGS_API std::string GetContainingFolder(std::string path)
Retrieves the containing folder of a given file or directory.
Definition: io.cpp:341
STRINGS_API void ValidatePath(std::string path)
Validates that the specified path exists.
Definition: io.cpp:94
STRINGS_API bool ReadBinaryFile(std::string path, void *data, int64_t *size)
Reads a file as raw binary data.
Definition: io.cpp:154
STRINGS_API std::vector< std::string > GetFileContentsAsLines(std::string path)
Reads a file as a list of strings.
Definition: io.cpp:122
#define STRINGS_API
Definition: io.h:8
STRINGS_API std::string GetRelativePathFromAbsolute(std::string absolute_path)
Converts an absolute path to a relative file path.
Definition: io.cpp:397
STRINGS_API void ExploreDirectory(std::string path)
Opens a directory within the system file explorer.
Definition: io.cpp:384
STRINGS_API bool ContainsChar(std::string string, char contains)
Determines whether or not a string contains the specified character.
Definition: string.cpp:165
@ Warning
Indicates a warning message. Not something critical, but something that could cause unexpected behavi...