diff options
Diffstat (limited to 'src/core/loader/loader.h')
| -rw-r--r-- | src/core/loader/loader.h | 28 |
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 | */ | ||
| 41 | FileType 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 | */ | ||
| 49 | FileType 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 | */ | ||
| 57 | FileType GuessFromExtension(const std::string& extension_); | ||
| 58 | |||
| 59 | /** | ||
| 60 | * Convert a FileType into a string which can be displayed to the user. | ||
| 61 | */ | ||
| 62 | const char* GetFileTypeString(FileType type); | ||
| 63 | |||
| 36 | /// Return type for functions in Loader namespace | 64 | /// Return type for functions in Loader namespace |
| 37 | enum class ResultStatus { | 65 | enum class ResultStatus { |
| 38 | Success, | 66 | Success, |