[ C++ RCOS Home | RCOS.java Home | RCOS Home | David's Home ]
Name: |
FsIface |
Comment: |
Everything a PID needs to know about the interface to any file system.. |
Collaborators: |
class FsIface {
private:
Knl *pTx; // copy of Exec Message dispatcher
UINT16 uID; // copy of Exec unique identifier
UINT16 uMagic; // "magic" number to offset array base
PXFCB pXfcb[MAX_FILES]; // files per process
BOOL ExpandName (char*, char*, UINT16); // expand name with wild card
inline UINT16 Idx (HANDLE h) { return (UINT16)h - uMagic; }
public:
FsIface (UINT16, Knl*);
~FsIface (void);
UINT16 IsEof (HANDLE); // check for End of File
UINT16 Open (HANDLE, UINT16 = FS_Ok); // open existing file
UINT16 Close (HANDLE, UINT16 = FS_Ok); // close and maybe flush
UINT16 Delete (HANDLE, UINT16 = FS_Ok); // delete if exists
UINT16 Creat (HANDLE, UINT16 = FS_Ok); // create new
UINT16 CloseAll (UINT16 = FS_Ok); // close and flush all
UINT16 Read (HANDLE, char&, UINT16 = FS_Ok); // read a char
UINT16 Read (HANDLE, char*, UINT16 = FS_Ok); // read delimited string
UINT16 Write (HANDLE, char, UINT16 = FS_Ok); // write single char
UINT16 Write (HANDLE, char*,UINT16 = FS_Ok); // write null terminated
UINT16 Stat (HANDLE, UINT16 = FS_Ok); // get (open) file size
UINT16 FindFirst (HANDLE, UINT16 = FS_Ok); // locate first by template
UINT16 FindNext (HANDLE, UINT16 = FS_Ok); // repeat for next match
UINT16 Allocate (HANDLE&, char*); // ask for a new XFCB
};