PAlib: PA_FS.h File Reference

Main Page | Modules | File List | Globals | Search for

# PA_FS.h File Reference

PA File System. More...

Go to the source code of this file.

## Data Structures

struct | PAFSFiles
struct | PAFSFolders
struct | PAFSSystems

## Defines

#define | PA_FSRam(size) char PA_FileSystem[size] = "PAFS007";
#define | PA_PAFSFile(FileN) ((void*)(PAFSStart+PA_FSFile[FileN].FilePos))
| Returns a pointer towards the given file number

## Functions

void | PA_FSAllInit (void)
u32 | PA_FSInit (void)

Initialises PAFS and returns the number of files found... Stores the file infos in the following form : PA_FSFile[file number].Name is the file name without the extension, .Ext si the file extension (txt, html, etc...), and .Length is the file length. PA_PAFSFile(FileNumber) is a pointer towards a given file

u32 | PA_FSRamInit (void)

Initialises PAFS and returns the number of files found... Stores the file infos in the following form : PA_FSFile[file number].Name is the file name without the extension, .Ext si the file extension (txt, html, etc...), and .Length is the file length. PA_PAFSFile(FileNumber) is a pointer towards a given file. This version stores the files in the ram, which makes it work in emulators and on WMB, but is limited to a few megs...

s32 | PA_FSGetFile (s16 start, char *name, char *extension)
| Search in PAFS for a given file. Returns the number of the file in the PA File System, or -1 if no file was found
s16 | PA_FSSearchExt (s16 *array, char *extension)
| Puts the number of all the PAFS files with a given extension in the array, and returns the number of files found
void | PA_Malloc (void **pointer, u32 size)
| Safe malloc, checks and frees the memory if necessary first

## Variables

PAFSSystems * | PA_FSSys
PAFSFiles * | PA_FSFile
PAFSFolders * | PA_FSFolder
char * | PAFSStart

## Detailed Description

PA File System.

PA File System