summaryrefslogtreecommitdiff
path: root/src/core/loader/loader.h
diff options
context:
space:
mode:
authorGravatar archshift2015-08-31 18:28:37 -0700
committerGravatar archshift2015-09-30 21:04:47 -0700
commitbba12520c432a5b5975a76f014ed3c80e3411bb6 (patch)
tree01d39ed607550bc36b025958b8b860f5cb36870d /src/core/loader/loader.h
parentMerge pull request #1123 from yuriks/gsp-flush (diff)
downloadyuzu-bba12520c432a5b5975a76f014ed3c80e3411bb6.tar.gz
yuzu-bba12520c432a5b5975a76f014ed3c80e3411bb6.tar.xz
yuzu-bba12520c432a5b5975a76f014ed3c80e3411bb6.zip
Expose loader helper functions for identifying files.
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,