34 #define INVALID_DISK_ID 0xffff 43 } E_STB_DSK_FILE_MODE;
50 } E_STB_DSK_FILE_POSITION;
57 } E_STB_DIR_ENTRY_TYPE;
130 void*
STB_DSKOpenFile(U16BIT disk_id, U8BIT *name, E_STB_DSK_FILE_MODE mode);
157 BOOLEAN
STB_DSKSeekFile(
void *file, E_STB_DSK_FILE_POSITION position, S32BIT offset);
196 BOOLEAN
STB_DSKFileSize(U16BIT disk_id, U8BIT *filename, U32BIT *filesize);
216 E_STB_DIR_ENTRY_TYPE *entry_type);
249 BOOLEAN
STB_DSKFullPathname(U16BIT disk_id, U8BIT *filename, U8BIT *pathname, U16BIT max_pathname_len);
299 #endif // _STBHWDSK_H BOOLEAN STB_DSKGetIntegrity(U16BIT disk_id)
Returns a summary of the disk integrity.
U32BIT STB_DSKGetUsed(U16BIT disk_id)
Returns the amount of space used on the disk.
U8BIT STB_DSKGetFormatProgress(U16BIT disk_id)
Gets the progress of the format operation.
void * STB_DSKOpenFile(U16BIT disk_id, U8BIT *name, E_STB_DSK_FILE_MODE mode)
Opens an existing file or creates a new one.
BOOLEAN STB_DSKSeekFile(void *file, E_STB_DSK_FILE_POSITION position, S32BIT offset)
Sets the read/write position of an open file.
void * STB_DSKOpenDirectory(U16BIT disk_id, U8BIT *dir_name)
Opens a directory in order to read the entries.
BOOLEAN STB_DSKIsFormatted(U16BIT disk_id)
Queries whether the disk is formatted.
BOOLEAN STB_DSKUnmountDisk(U16BIT disk_id)
Attempts to unmount the given disk, if it isn't already unmounted.
U16BIT STB_DSKGetDiskIdByIndex(U16BIT index)
Returns the id of the disk at the given index.
BOOLEAN STB_DSKTellFile(void *file, U32BIT *offset)
Gets the current position in an open file.
void STB_DSKCloseFile(void *file)
Flushes and closes an open file.
BOOLEAN STB_DSKIsRemoveable(U16BIT disk_id)
Checks if the given disk is removeable.
BOOLEAN STB_DSKDeleteDirectory(U16BIT disk_id, U8BIT *dir_name)
Deletes a directory and all it contents, so use with care!
U16BIT STB_DSKGetNumDisks(void)
Returns the number of disks currently detected.
void STB_DSKCloseDirectory(void *dir)
Closes the directory for reading.
void STB_DSKInitialise(void)
Initialise the hard disk component.
U32BIT STB_DSKWriteFile(void *file, U8BIT *data, U32BIT size)
Writes data to an open file.
BOOLEAN STB_DSKFileSize(U16BIT disk_id, U8BIT *filename, U32BIT *filesize)
Returns the size in KB of the given file.
BOOLEAN STB_DSKReadDirectory(void *dir, U8BIT *filename, U16BIT filename_len, E_STB_DIR_ENTRY_TYPE *entry_type)
Reads the next entry from the directory, returning the name of the entry and the type of the entry...
BOOLEAN STB_DSKFileExists(U16BIT disk_id, U8BIT *filename)
Checks whether a file/directory will the given name exists.
U32BIT STB_DSKGetSize(U16BIT disk_id)
Returns the size (capacity) of the disk.
System Wide Global Technical Data Type Definitions.
BOOLEAN STB_DSKFullPathname(U16BIT disk_id, U8BIT *filename, U8BIT *pathname, U16BIT max_pathname_len)
Copies the full pathname for the given filename, including the mount directory, to the given string a...
U32BIT STB_DSKReadFile(void *file, U8BIT *data, U32BIT size)
Reads data from an open file.
BOOLEAN STB_DSKDeleteFile(U16BIT disk_id, U8BIT *filename)
Deletes the file from the given disk.
U8BIT STB_DSKGetRepairProgress(U16BIT disk_id)
Gets the progress of the repair operation.
BOOLEAN STB_DSKCreateDirectory(U16BIT disk_id, U8BIT *dir_path)
Creates a directory with the given name.
void STB_DSKSetStandby(BOOLEAN state)
Put all disks into or out of standby mode.
void STB_DSKRepair(U16BIT disk_id)
Initiates a data repair of the hard disk. This may cause the disk to become unreadable.
BOOLEAN STB_DSKGetDiskName(U16BIT disk_id, U8BIT *name, U16BIT name_len)
Gets the name of a disk and copies it into the array provided.
BOOLEAN STB_DSKMountDisk(U16BIT disk_id)
Attempts to mount the given disk, if it isn't already mounted.
BOOLEAN STB_DSKIsMounted(U16BIT disk_id)
Checks if the given disk is mounted.
void STB_DSKFormat(U16BIT disk_id)
Initiates formatting and partitioning of the hard disk. This will erase all data on the disk! ...