Main Page | Modules | Namespace List | Data Structures | Directories | File List | Namespace Members | Data Fields | Globals

fsmgr.h File Reference

#include "../msd/MSDmanager.h"
#include "../stdio/BSstdio.h"

File Open Modes

#define FS_O_BIT_RD   0x1
 file open mode READ
#define FS_O_BIT_WR   0x2
 file open mode WRITE
#define FS_O_BIT_APP   0x4
 file open mode APPEND
#define FS_O_BIT_CR   0x8
 file open mode CREATE
#define FS_O_BIT_TXT   0x10
 file open mode TEXT
#define FS_O_BIT_BIN   0x20
 file open mode BINARY

File Attributes

#define FS_A_DIR   0x1
 file attribute DIRECTORY
#define FS_A_RDONLY   0x2
 file attribute READ ONLY
#define FS_A_HIDDEN   0x4
 file attribute HIDDEN
#define FS_A_SYSTEM   0x8
 file attribute SYSTEM
#define FS_A_ARCHIVE   0x10
 file attribute ARCHIVE
#define FS_A_ALL   0xffff
 file attribute ALL ATTRIBUTES

File System Functions

typedef bool(* FS_FN_FORMAT )(void *hMsd)
typedef void *(* FS_FN_MOUNT )(void *hMsd)
typedef bool(* FS_FN_UNMOUNT )(void *partition)
typedef unsigned long(* FS_FN_PART_SIZE )(void *partition)
typedef unsigned long(* FS_FN_PART_FREE )(void *partition)
typedef int(* FS_FN_DELFILE )(void *partition, const char *filename)
typedef bool(* FS_FN_DIREXISTS )(void *partition, const char *dir)
typedef bool(* FS_FN_DIREMPTY )(void *partition, const char *dir)
typedef int(* FS_FN_RMDIR )(void *partition, const char *dir)
typedef int(* FS_FN_MKDIR )(void *partition, const char *dir)
typedef void *(* FS_FN_OPEN )(void *pPartition, const char *fname, unsigned short modebits)
typedef int(* FS_FN_CLOSE )(void *stream)
typedef int(* FS_FN_EOF )(void *stream)
typedef int(* FS_FN_READ )(void *buffer, size_t size, size_t num, void *stream)
typedef int(* FS_FN_WRITE )(const void *buffer, size_t size, size_t count, void *stream)
typedef int(* FS_FN_PUTC )(int ch, void *stream)
typedef int(* FS_FN_GETC )(void *stream)
typedef int(* FS_FN_SEEK )(void *stream, long offset, int origin)
typedef int(* FS_FN_FIND_FIRST )(void *partition, const char *pathname, T_FF_INFO *ffblk, int attrib)
typedef int(* FS_FN_FIND_NEXT )(void *partition, T_FF_INFO *ffblk)
typedef int(* FS_FN_FIND_CLOSE )(T_FF_INFO *ffblk)

Defines

#define MAX_PARTITION_NAME   10
#define MAX_PATH_NAME   260
#define MAX_FILESYSTEM_NAME   10

Functions

void fs_setup (void)
 have to be called to initialize the file systems manager environment.
void fs_cleanup ()
 have to be called to clean up and free resources of the file system management
void fs_printPartitions (void)
 displays all available partitions
bool fs_mountPartition (const char *pa_acPartitionName, const char *pa_acMsdName, const char *pa_acFileSystem)
 mounts a partitions on a mass storage device (MSD) with a specified filesystem
bool fs_unmountPartition (const char *pa_acPartitionName)
 unmounts a partition
bool fs_formatDevice (const char *pa_acDeviceName, const char *pa_acFilesystem)
 formats the specified device with the specified file system
void fs_register (const char *pa_acName, T_FS_FUNCTIONS *pa_pstFunctions)
 registers a specified filesystem to the file system management
T_FS_PARTITIONfs_getActivePartition (void)
 returns a pointer to the currently active partition struct (0 if none is active)
void fs_setActivePartition (T_FS_PARTITION *pa_pPartition)
 sets the supplied parition as currently active
T_FS_PARTITIONfs_getPartition (const char *pa_acName)
 returns a pointer to a specified partition struct (0 if the name is not valid)
unsigned long fs_partitionSize (T_FS_PARTITION *pa_pPartition)
 returns the overall size of the specified partition in bytes
unsigned long fs_partitionFree (T_FS_PARTITION *pa_pPartition)
 returns the amount of free bytes of the specified partition

Detailed Description

Author:
Daniel Weber, Roland Oberhammer
Date:
2005-12-03
Version:
1.0

Generated on Thu Mar 2 16:11:28 2006 for VDK Blacksheep by  doxygen 1.4.1