libElysianVMU 1.6.0
Full-featured, accurate, cross-platform library emulating the Dreamcast's Visual Memory Unit
Loading...
Searching...
No Matches
EvmuFileManager Struct Reference

#include <evmu_file_manager.h>

Inheritance diagram for EvmuFileManager:
EvmuFat EvmuFlash EvmuPeripheral EvmuIMemory EvmuIBehavior

Data Fields

union { 
 
   EvmuFileManagerClass *   pClass 
 
   EvmuFat   base 
 
};  
 
- Data Fields inherited from EvmuFat
union { 
 
   EvmuFatClass *   pClass 
 
   EvmuFlash   base 
 
};  
 
- Data Fields inherited from EvmuFlash
union { 
 
   EvmuFlashClass *   pClass 
 
   EvmuPeripheral   base 
 
};  
 
GblBool dataChanged
 
- Data Fields inherited from EvmuPeripheral
union { 
 
   EvmuPeripheralClass *   pClass 
 
   GblObject   base 
 
};  
 
GblFlags logLevel
 

Related Symbols

(Note that these are not member symbols.)

Filesystem Operations

Methods for serializing and deserializing the filesystem

EVMU_RESULT EvmuFileManager_load (EvmuFileManager *pSelf, const char *pPath)
 
EVMU_RESULT EvmuFileManager_save (const EvmuFileManager *pSelf, const char *pPath)
 
EVMU_RESULT EvmuFileManager_defrag (EvmuFileManager *pSelf)
 
File Discovery

Methods for enumerating, looking-up, and retrieving files

size_t EvmuFileManager_count (const EvmuFileManager *pSelf)
 
EvmuDirEntryEvmuFileManager_file (const EvmuFileManager *pSelf, size_t index)
 
EvmuDirEntryEvmuFileManager_game (const EvmuFileManager *pSelf)
 
EvmuDirEntryEvmuFileManager_iconData (const EvmuFileManager *pSelf)
 
EvmuDirEntryEvmuFileManager_find (const EvmuFileManager *pSelf, const char *pName)
 
GblBool EvmuFileManager_foreach (const EvmuFileManager *pSelf, EvmuDirEntryIterFn pFnIt, void *pClosure)
 
File Operations

Methods for operating on and with files

EvmuDirEntryEvmuFileManager_alloc (EvmuFileManager *pSelf, EvmuNewFileInfo *pInfo, const void *pData)
 
size_t EvmuFileManager_free (EvmuFileManager *pSelf, EvmuDirEntry *pEntry)
 
size_t EvmuFileManager_read (const EvmuFileManager *pSelf, const EvmuDirEntry *pEntry, void *pBuffer, size_t size, size_t offset, GblBool inclHdr)
 
size_t EvmuFileManager_write (const EvmuFileManager *pSelf, const EvmuDirEntry *pEntry, const void *pBuffer, size_t size, size_t offset)
 
EVMU_RESULT EvmuFileManager_export (const EvmuFileManager *pSelf, const EvmuDirEntry *pEntry, const char *pPath)
 
File Information

Methods for calculating and retrieving file info

size_t EvmuFileManager_bytes (const EvmuFileManager *pSelf, const EvmuDirEntry *pEntry)
 
size_t EvmuFileManager_visibleBytes (const EvmuFileManager *pSelf, const EvmuDirEntry *pEntry, GblBool inclHdr)
 
size_t EvmuFileManager_index (const EvmuFileManager *pSelf, const EvmuDirEntry *pEntry)
 
EvmuVmsEvmuFileManager_vms (const EvmuFileManager *pSelf, const EvmuDirEntry *pEntry)
 
uint16_t EvmuFileManager_crc (const EvmuFileManager *pSelf, const EvmuDirEntry *pEntry)
 

Detailed Description

High-level file-oriented flash API.

EvmuFileManager is the most high-level, user-friendly way to manage the VMU's filesystem and handle loading and saving both both individual ROM images and the entire flash filesystem.

See also
EvmuFileManagerClass

Definition at line 69 of file evmu_file_manager.h.

Friends And Related Symbol Documentation

◆ EvmuFileManager_alloc()

EvmuDirEntry * EvmuFileManager_alloc ( EvmuFileManager * pSelf,
EvmuNewFileInfo * pInfo,
const void * pData )
related

Creates storage for a new file with the given info, copying its contents into the filesystem.

◆ EvmuFileManager_bytes()

size_t EvmuFileManager_bytes ( const EvmuFileManager * pSelf,
const EvmuDirEntry * pEntry )
related

Returns the total byte size of the file on the filesystem, including the VMS header, icons, eyecatc, etc.

◆ EvmuFileManager_count()

size_t EvmuFileManager_count ( const EvmuFileManager * pSelf)
related

Returns the number of files which are currently loaded within the filesystem.

◆ EvmuFileManager_crc()

uint16_t EvmuFileManager_crc ( const EvmuFileManager * pSelf,
const EvmuDirEntry * pEntry )
related

Calculates the 16-bit CRC for an existing file on the filesystem.

◆ EvmuFileManager_defrag()

EVMU_RESULT EvmuFileManager_defrag ( EvmuFileManager * pSelf)
related

Defragments the filesystem, consolidating all free blocks, storing all files contiguously.

◆ EvmuFileManager_export()

EVMU_RESULT EvmuFileManager_export ( const EvmuFileManager * pSelf,
const EvmuDirEntry * pEntry,
const char * pPath )
related

Exports an existing file to the given path, with the file format automatically deduced from the extension type.

◆ EvmuFileManager_file()

EvmuDirEntry * EvmuFileManager_file ( const EvmuFileManager * pSelf,
size_t index )
related

Returns the directory entry for the file at the given index, or NULL if there isn't one.

◆ EvmuFileManager_find()

EvmuDirEntry * EvmuFileManager_find ( const EvmuFileManager * pSelf,
const char * pName )
related

Searches for a directory entry with the given name, returning it if found or returning NULL if not found.

◆ EvmuFileManager_foreach()

GblBool EvmuFileManager_foreach ( const EvmuFileManager * pSelf,
EvmuDirEntryIterFn pFnIt,
void * pClosure )
related

Iterates over directory entries, passing each with pClosure to pFnIt, returning early with GBL_TRUE if pFnIt returns GBL_TRUE.

◆ EvmuFileManager_free()

size_t EvmuFileManager_free ( EvmuFileManager * pSelf,
EvmuDirEntry * pEntry )
related

Destroys an existing file, releasing resources back to the filesystem.

◆ EvmuFileManager_game()

EvmuDirEntry * EvmuFileManager_game ( const EvmuFileManager * pSelf)
related

Returns the directory entry for the currently loaded GAME file, or NULL if there isn't one.

◆ EvmuFileManager_iconData()

EvmuDirEntry * EvmuFileManager_iconData ( const EvmuFileManager * pSelf)
related

Returns the directory entry for the currently loaded ICONDATA.VMS file, or NULL if there isn't one.

◆ EvmuFileManager_index()

size_t EvmuFileManager_index ( const EvmuFileManager * pSelf,
const EvmuDirEntry * pEntry )
related

Returns the file index corresponding to a given directory entry for a file, or EVMU_FILE_INDEX_INVALID if not found.

◆ EvmuFileManager_load()

EVMU_RESULT EvmuFileManager_load ( EvmuFileManager * pSelf,
const char * pPath )
related

Loads a generic image whose type is determined by its extension into flash.

◆ EvmuFileManager_read()

size_t EvmuFileManager_read ( const EvmuFileManager * pSelf,
const EvmuDirEntry * pEntry,
void * pBuffer,
size_t size,
size_t offset,
GblBool inclHdr )
related

Performs a generic read from an existing file, returning the number of bytes successfully read. When inclHdr is false, the VMS header/images region is omitted and offset is relative to that headerless byte stream.

◆ EvmuFileManager_save()

EVMU_RESULT EvmuFileManager_save ( const EvmuFileManager * pSelf,
const char * pPath )
related

Saves a binary image of the entire contents of flash to a file, whose format is determined by its extension.

◆ EvmuFileManager_visibleBytes()

size_t EvmuFileManager_visibleBytes ( const EvmuFileManager * pSelf,
const EvmuDirEntry * pEntry,
GblBool inclHdr )
related

Returns the byte size of the logical stream exposed by EvmuFileManager_read() for the given inclHdr mode.

◆ EvmuFileManager_vms()

EvmuVms * EvmuFileManager_vms ( const EvmuFileManager * pSelf,
const EvmuDirEntry * pEntry )
related

Returns the VMS header segment (ONLY) for an existing file (not the entire VMS data with icons, eyecatch, etc)

◆ EvmuFileManager_write()

size_t EvmuFileManager_write ( const EvmuFileManager * pSelf,
const EvmuDirEntry * pEntry,
const void * pBuffer,
size_t size,
size_t offset )
related

Performs a generic write from an existing file, returning the number of bytes successfully written.

Field Documentation

◆ base

EvmuFat EvmuFileManager::base

Inherited base instance structure.

Definition at line 69 of file evmu_file_manager.h.

◆ pClass

EvmuFileManagerClass* EvmuFileManager::pClass

Pointer to class/vtable structure.

Definition at line 69 of file evmu_file_manager.h.


The documentation for this struct was generated from the following file: