193 int (*
close)(
int async,
int fd, uint32_t *err,
int req);
195 int (*
fflush)(
int async,
int fd, uint32_t *err,
int req);
197 int (*
format)(
int async, int16_t drive,
int param, uint32_t *err,
int req);
199 int (*
get_file_attrib)(
int async,
const char *path,
const WSHDR *wpath, uint8_t *attr, uint32_t *err,
int req);
203 int (*
is_dir)(
int async,
const char *path,
const WSHDR *wpath, uint32_t *err,
int req);
204 int (*
mkdir)(
int async,
const char *path,
const WSHDR *wpath, uint32_t *err,
int req);
205 int (*
open)(
int async,
const char *path,
const WSHDR *wpath, uint32_t mode, uint32_t perm, uint32_t *err,
int req);
206 int (*
read16)(
int async,
int fd,
void *buf,
int len, uint32_t *err,
int req);
207 int (*
read)(
int async,
int fd,
void *buf,
int len, uint32_t *err,
int req);
208 int (*
rename)(
int async,
const char *old_path,
const WSHDR *old_wpath,
const char *new_path,
const WSHDR *new_wpath,
209 uint32_t *err,
int req);
210 int (*
rmdir)(
int async,
const char *path,
const WSHDR *wpath, uint32_t *err,
int req);
211 int (*
lseek)(
int async,
int fd, int32_t offset, uint32_t origin, uint32_t *err, uint32_t *err2,
int req);
213 int (*
set_file_size)(
int async,
int fd, uint32_t size, uint32_t *err,
int req);
214 int (*
set_file_time)(
int async,
int fd, uint16_t date, uint16_t time, uint32_t *err,
int req);
216 int (*
truncate)(
int async,
int fd,
int length, uint32_t *err,
int req);
217 int (*
unlink)(
int async,
const char *path,
const WSHDR *wpath, uint32_t *err,
int req);
218 int (*
mount)(
int async, int16_t drive, uint32_t *err,
int req);
219 int (*
unmount)(
int async, int16_t drive, uint32_t *err,
int req);
220 int (*
write16)(
int async,
int fd,
const void *buf,
int len, uint32_t *err,
int req);
221 int (*
write)(
int async,
int fd,
const void *buf,
int len, uint32_t *err,
int req);
229 int (*
format)(
int async, int16_t drive, uint32_t *err,
int req);
231 int (*
get_file_attrib)(
int async,
const char *path, uint8_t *attr, uint32_t *err,
int req);
232 int (*
get_free_space)(
int async, int16_t drive, uint32_t *err,
int req);
235 int (*
is_dir)(
int async,
const char *path, uint32_t *err,
int req);
236 int (*
mkdir)(
int async,
const char *path, uint32_t *err,
int req);
237 int (*
open)(
int async,
const char *path, uint32_t mode, uint32_t perm, uint32_t *err,
int req);
238 int (*
read16)(
int async,
int fd,
void *buf,
int len, uint32_t *err,
int req);
239 int (*
rename)(
int async,
const char *old_path,
const char *new_path, uint32_t *err,
int req);
240 int (*
rmdir)(
int async,
const char *path, uint32_t *err,
int req);
241 int (*
lseek)(
int async,
int fd, int32_t offset, uint32_t origin, uint32_t *err, uint32_t *err2,
int req);
242 int (*
set_file_attrib)(
int async,
const char *path, uint8_t attr, uint32_t *err,
int req);
243 int (*
set_file_size)(
int async,
int fd, uint32_t size, uint32_t *err,
int req);
244 int (*
set_file_time)(
int async,
int fd,
const void *datetime, uint32_t *err,
int req);
245 int (*
stat)(
int async,
const char *path,
FSTATS *
stat, uint32_t *err,
int req);
246 int (*
truncate)(
int async,
int fd,
int length, uint32_t *err,
int req);
247 int (*
unlink)(
int async,
const char *path, uint32_t *err,
int req);
249 int (*
write16)(
int async,
int fd,
const void *buf,
int len, uint32_t *err,
int req);
252 int (*unk_68)(
int drive);
296int
sys_open(
const char *path, uint32_t mode, uint32_t permission, uint32_t *err)
309int sys_read(
int fd,
void *buffer,
int length, uint32_t *err)
355long sys_lseek(
int fd, int32_t offset, uint32_t origin, uint32_t *err, uint32_t *err2)
517int setfiletime(
int fd, uint16_t date, uint16_t time, uint32_t *err)
718int _open(
const char *path, uint32_t mode, uint32_t permission, uint32_t *err)
726int _read(
int fd,
void *buffer,
int length, uint32_t *err)
758long _lseek(
int fd, uint32_t offset, uint32_t origin, uint32_t *err, uint32_t *err2)
833#ifdef SWILIB_LEGACY_COMPAT
846int
fopen(
const char *path, uint32_t mode, uint32_t permission, uint32_t *err)
854int fread(
int fd,
void *buffer,
int length, uint32_t *err)
886long lseek(
int fd, uint32_t offset, uint32_t origin, uint32_t *err, uint32_t *err2)
#define __swi_end(number, func, call)
#define __swi_begin(number)
int(* find_next_file)(int async, DIR_ENTRY *de, uint32_t *err, int req)
int(* close)(int async, int fd, uint32_t *err, int req)
const FS_OPS * ops
Driver methods.
WSHDR * duration_mp3_ws
OUT: Music duration in the human-readable format.
int(* fflush)(int async, int fd, uint32_t *err, int req)
int(* read)(int async, int fd, void *buf, int len, uint32_t *err, int req)
int(* set_file_time)(int async, int fd, uint16_t date, uint16_t time, uint32_t *err, int req)
WSHDR * tag_title_ws
OUT: Audio IDv3 tag: title.
WSHDR * bitrate_ws
OUT: Audio bitrate.
int(* mkdir)(int async, const char *path, const WSHDR *wpath, uint32_t *err, int req)
int(* write)(int async, int fd, const void *buf, int len, uint32_t *err, int req)
int(* write16)(int async, int fd, const void *buf, int len, uint32_t *err, int req)
16-bit result
int(* set_file_attrib)(int async, const char *path, const WSHDR *wpath, uint8_t attr, uint32_t *err, int req)
int used
Nonzero when the entry is registered.
uint32_t type
IN: info type, see FilePropTypeID.
WSHDR * resolution_ws
OUT: Picture resolution in the human-readable format.
int used
Nonzero when the entry is registered.
uint32_t duration_mp3
OUT: Music duration in clocks (1 clock = 4.615 ms)
int16_t last_handle
Last file handle of the driver.
int(* get_free_space)(int async, int16_t drive, uint32_t *err, int req)
int(* fstat)(int async, int fd, FSTATS *stat, uint32_t *err, int req)
uint16_t letter
Drive letter.
WSHDR * tag_album_ws
OUT: Audio IDv3 tag: album.
WSHDR * audio_frequency_ws
OUT: Audio discretisation frequency.
int(* find_close)(int async, DIR_ENTRY *de, uint32_t *err, int req)
int(* stat)(int async, const char *path, const WSHDR *wpath, FSTATS *stat, uint32_t *err, int req)
WSHDR * unk_tag_2_ws
OUT: Audio IDv3 tag: ???
int(* format)(int async, int16_t drive, int param, uint32_t *err, int req)
int(* unmount)(int async, int16_t drive, uint32_t *err, int req)
short wsfolder_name[128+1]
int16_t first_handle
First file handle of the driver.
int uid
IN: ID of the extension, see: GetExtUidByFileName_ws.
WSHDR * tag_year_ws
OUT: Audio IDv3 tag: album year.
int(* set_file_size)(int async, int fd, uint32_t size, uint32_t *err, int req)
uint32_t create_date_time
int(* open)(int async, const char *path, const WSHDR *wpath, uint32_t mode, uint32_t perm, uint32_t *err, int req)
int(* is_dir)(int async, const char *path, const WSHDR *wpath, uint32_t *err, int req)
int(* get_total_space)(int drive)
long length
OUT: .wav duration in clocks (1 clock - 4.615 ms)
WSHDR * tag_artist_ws
OUT: Audio IDv3 tag: artist.
int(* lseek)(int async, int fd, int32_t offset, uint32_t origin, uint32_t *err, uint32_t *err2, int req)
WSHDR * wfilename
IN: Path ot the .wav file.
int(* find_first_file)(int async, DIR_ENTRY *de, const char *mask, const WSHDR *wmask, uint32_t *err, int req)
int driver_id
Driver ID, see RamFsDrivers.
const FS_OPS * ops
Driver methods.
WSHDR * filename
IN: full path to the file.
uint16_t height
OUT: Picture resolution: height.
uint16_t width
OUT: Picture resolution: width.
WSHDR * tag_track_ws
OUT: Audio IDv3 tag: track.
WSHDR * size_ws
OUT: File weight in the human-readable format.
WSHDR * duration_wav_ws
OUT: Audio duration in the human-readable format.
int(* unlink)(int async, const char *path, const WSHDR *wpath, uint32_t *err, int req)
int(* get_file_attrib)(int async, const char *path, const WSHDR *wpath, uint8_t *attr, uint32_t *err, int req)
int(* rmdir)(int async, const char *path, const WSHDR *wpath, uint32_t *err, int req)
int(* rename)(int async, const char *old_path, const WSHDR *old_wpath, const char *new_path, const WSHDR *new_wpath, uint32_t *err, int req)
int(* read16)(int async, int fd, void *buf, int len, uint32_t *err, int req)
16-bit result
uint32_t duration_wav
OUT: Audio duration in clocks (1 clock = 4.615 ms)
int(* get_drive_info)(int16_t drive, void *info)
Fills a driver-specific drive info block.
int16_t drive
Drive number.
int(* truncate)(int async, int fd, int length, uint32_t *err, int req)
int(* mount)(int async, int16_t drive, uint32_t *err, int req)
int sys_fflush(int fd, uint32_t *err)
Force write data from the OS write buffer.
long _lseek(int fd, uint32_t offset, uint32_t origin, uint32_t *err, uint32_t *err2)
Move to the desired position within the file.
int GetFreeFlexSpace(int drive, uint32_t *err)
Get free space on a specified disk.
int sys_rename_ws(const WSHDR *old_name, const WSHDR *new_name, uint32_t *err)
Rename file or directory.
int GetFileAttrib_ws(const WSHDR *path, uint8_t *attr, uint32_t *err)
Get attributes of the file or directory.
int setfiletime(int fd, uint16_t date, uint16_t time, uint32_t *err)
Set file date and time.
int sys_stat_ws(const WSHDR *path, FSTATS *stat, uint32_t *err)
Get information about the file or directory.
FilePermissionMode
Request permissions for file operations.
int rmdir(const char *dirname, uint32_t *err)
Remove directory.
long sys_lseek(int fd, int32_t offset, uint32_t origin, uint32_t *err, uint32_t *err2)
Move to the desired position within the file.
int sys_close(int fd, uint32_t *err)
Close file descriptor.
FileAccessMode
File access mode.
int truncate(int fd, int length, uint32_t *err)
Truncate the file to the given size.
int fclose(int fd, uint32_t *err)
Close file descriptor.
int sys_unlink_ws(const WSHDR *path, uint32_t *err)
Remove file.
FileSeekOrigin
Modes for seek()
int unlink(const char *path, uint32_t *err)
Remove file.
int SetFileAttrib(const char *path, uint8_t attr, uint32_t *err)
Set attributes for the file or directory.
int sys_fstat(int fd, FSTATS *stat, uint32_t *err)
Get information about the file or directory by fd.
FileAttributes
Attributes for a file or directory.
int sys_unlink(const char *path, uint32_t *err)
Remove file.
int SetFileAttrib_ws(const WSHDR *path, uint8_t attr, uint32_t *err)
Set attributes for the file or directory.
int _mkdir(const char *dirname, uint32_t *err)
Create a new directory.
int sys_mkdir(const char *dirname, uint32_t *err)
Create a new directory.
int _read(int fd, void *buffer, int length, uint32_t *err)
Read data from a file.
int _open(const char *path, uint32_t mode, uint32_t permission, uint32_t *err)
Open the file.
int mkdir(const char *dirname, uint32_t *err)
Create a new directory.
int sys_mount(uint16_t drive, uint32_t *err)
Mount drive by index.
int sys_read(int fd, void *buffer, int length, uint32_t *err)
Read data from a file.
int fopen(const char *path, uint32_t mode, uint32_t permission, uint32_t *err)
Open the file.
int GetWavLen(const char *path)
Get duration of the .wav file.
int _truncate(int fd, int length, uint32_t *err)
Truncate the file to the given size.
int sys_rmdir(const char *dirname, uint32_t *err)
Remove directory.
long lseek(int fd, uint32_t offset, uint32_t origin, uint32_t *err, uint32_t *err2)
Move to the desired position within the file.
int sys_truncate(int fd, int length, uint32_t *err)
Truncate the file to the given size.
int FindClose(DIR_ENTRY *dir_entry, uint32_t *err)
Close search session.
int _unlink(const char *path, uint32_t *err)
Remove file.
int sys_rename(const char *old_name, const char *new_name, uint32_t *err)
Rename file or directory.
int sys_unmount(uint16_t drive, uint32_t *err)
Unmount drive by index.
int sys_mkdir_ws(const WSHDR *dirname, uint32_t *err)
Create a new directory.
int _write(int fd, const void *buffer, int length, uint32_t *err)
Write data to a file.
int GetFileStats(const char *path, FSTATS *stat, uint32_t *err)
Get information about the file or directory.
int sys_rmdir_ws(const WSHDR *path, uint32_t *err)
Remove directory.
int sys_stat(const char *path, FSTATS *stat, uint32_t *err)
Get information about the file or directory.
int fread(int fd, void *buffer, int length, uint32_t *err)
Read data from a file.
int isdir_ws(const WSHDR *path, uint32_t *err)
Check whether a directory exists at the given path.
FS_DRIVE * RamFsDrives(void)
Get the file system drive table.
int GetTotalFlexSpace(int drive, uint32_t *err)
Get total space on a specified disk.
int isdir(const char *path, uint32_t *err)
Check whether a directory exists at the given path.
int _close(int fd, uint32_t *err)
Close file descriptor.
int sys_write(int fd, const void *buffer, int length, uint32_t *err)
Write data to a file.
int fmove(const char *old_name, const char *new_name, uint32_t *err)
Rename file or directory.
int sys_format(uint16_t drive, uint32_t *err)
Format drive by index.
int FindFirstFile_ws(DIR_ENTRY *dir_entry, const WSHDR *mask, uint32_t *err)
Open search session and get first result.
FS_DRIVER * RamFsDrivers(void)
Get the file system driver table.
int fflush(int fd, uint32_t *err)
Force write data from the OS write buffer.
int _rmdir(const char *dirname, uint32_t *err)
Remove directory.
int GetFileAttrib(const char *path, uint8_t *attr, uint32_t *err)
Get attributes of the file or directory.
int GetPathOfFoundFile(DIR_ENTRY *dir_entry, void *file_info)
Convert a directory-search result to the SG/X75 file-list record.
int sys_open(const char *path, uint32_t mode, uint32_t permission, uint32_t *err)
Open the file.
int GetFileProp(FILE_PROP *props, const WSHDR *file, const WSHDR *path)
Get extended file properties.
int _flush(int fd, uint32_t *err)
Force write data from the OS write buffer.
int setfilesize(int fd, uint32_t length, uint32_t *err)
Truncate or grow the file to the given size.
int FindNextFile(DIR_ENTRY *dir_entry, uint32_t *err)
Continue searching for files and get next result.
int fwrite(int fd, const void *buffer, int length, uint32_t *err)
Write data to a file.
int FindFirstFile(DIR_ENTRY *dir_entry, const char *mask, uint32_t *err)
Open search session and get first result.
void * FS_MemAlloc(int size)
Allocate memory from the file system heap.
int fexists(WSHDR *path)
Check if a regular file exists.
@ FILE_PROP_TYPE_GENERAL
General info, only size.
@ FILE_PROP_TYPE_PICTURE
Picture info.
@ FILE_PROP_TYPE_AUDIO
.wav/.mid info
@ FILE_PROP_TYPE_MUSIC
.mp3/.aac info
@ FILE_PROP_TYPE_VIDEO
Video info.
Extended file properties.
File system drive (see RamFsDrives).
File system driver (see RamFsDrivers).
File system driver methods (see FS_DRIVER and FS_DRIVE).
Information about a file or directory.