summaryrefslogtreecommitdiff
path: root/src/core/loader/loader.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/loader/loader.h')
-rw-r--r--src/core/loader/loader.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/core/loader/loader.h b/src/core/loader/loader.h
index a37d3348c..8de95dacf 100644
--- a/src/core/loader/loader.h
+++ b/src/core/loader/loader.h
@@ -33,6 +33,34 @@ enum class FileType {
33 THREEDSX, //3DSX 33 THREEDSX, //3DSX
34}; 34};
35 35
36/**
37 * Identifies the type of a bootable file based on the magic value in its header.
38 * @param file open file
39 * @return FileType of file
40 */
41FileType IdentifyFile(FileUtil::IOFile& file);
42
43/**
44 * Identifies the type of a bootable file based on the magic value in its header.
45 * @param file_name path to file
46 * @return FileType of file. Note: this will return FileType::Unknown if it is unable to determine
47 * a filetype, and will never return FileType::Error.
48 */
49FileType IdentifyFile(const std::string& file_name);
50
51/**
52 * Guess the type of a bootable file from its extension
53 * @param extension String extension of bootable file
54 * @return FileType of file. Note: this will return FileType::Unknown if it is unable to determine
55 * a filetype, and will never return FileType::Error.
56 */
57FileType GuessFromExtension(const std::string& extension_);
58
59/**
60 * Convert a FileType into a string which can be displayed to the user.
61 */
62const char* GetFileTypeString(FileType type);
63
36/// Return type for functions in Loader namespace 64/// Return type for functions in Loader namespace
37enum class ResultStatus { 65enum class ResultStatus {
38 Success, 66 Success,