usbloadergx/source/homebrewboot/HomebrewFiles.h

47 lines
1.3 KiB
C
Raw Normal View History

/****************************************************************************
* HomebrewFiles Class
* for USB Loader GX
***************************************************************************/
#ifndef ___HOMEBREWFILES_H_
#define ___HOMEBREWFILES_H_
#define MAXHOMEBREWS 500
typedef struct
{
2010-09-24 02:48:03 +02:00
char FileName[100];
char FilePath[150];
unsigned int FileSize;
} FileInfos;
class HomebrewFiles
{
public:
//!Constructor
//!\param path Path where to check for homebrew files
2010-09-24 02:48:03 +02:00
HomebrewFiles(const char * path);
//!Destructor
~HomebrewFiles();
//! Load the dol/elf list of a path
//!\param path Path where to check for homebrew files
2010-09-24 02:48:03 +02:00
bool LoadPath(const char * path);
//! Get the a filename of the list
//!\param list index
2010-09-24 02:48:03 +02:00
char * GetFilename(int index);
//! Get the a filepath of the list
//!\param list index
2010-09-24 02:48:03 +02:00
char * GetFilepath(int index);
//! Get the a filesize of the list
//!\param list index
2010-09-24 02:48:03 +02:00
unsigned int GetFilesize(int index);
//! Get the filecount of the whole list
int GetFilecount() { return filecount; };
//! Sort list by filepath
void SortList();
protected:
int filecount;
FileInfos *FileInfo;
};
#endif