llvm-mos-sdk
|
Go to the source code of this file.
Classes | |
struct | neo_file_stat |
Typedefs | |
typedef enum neo_file_mode | neo_file_mode_t |
typedef struct neo_file_stat | neo_file_stat_t |
Enumerations | |
enum | neo_file_mode { NEO_FILE_READ = 0, NEO_FILE_WRITE = 1, NEO_FILE_READ_WRITE = 2, NEO_FILE_CREATE = 3 } |
Functions | |
void | neo_file_list_directory (void) |
Display the listing of files in the current directory. More... | |
void | neo_file_load_p (const neo_pstring_t *filename, void *dest) |
Load a file into memory, using a Pascal string for the filename. More... | |
void | neo_file_load (const char *filename, void *dest) |
Load a file into memory, using a C string for the filename. More... | |
void | neo_file_store_p (const neo_pstring_t *filename, const void *src, uint16_t len) |
Store a file from memory, using a Pascal string for the filename. More... | |
void | neo_file_store (const char *filename, const void *src, uint16_t len) |
Store a file from memory, using a C string for the filename. More... | |
void | neo_file_open_p (uint8_t channel, const neo_pstring_t *filename, uint8_t mode) |
Open a file channel, using a Pascal string for the filename. More... | |
void | neo_file_open (uint8_t channel, const char *filename, uint8_t mode) |
Open a file channel, using a C string for the filename. More... | |
void | neo_file_close (uint8_t channel) |
Close a file channel. More... | |
void | neo_file_seek (uint8_t channel, uint32_t pos) |
Seek a file. More... | |
uint32_t | neo_file_tell (uint8_t channel) |
Tell a file's position. More... | |
uint16_t | neo_file_read (uint8_t channel, void *dest, uint16_t len) |
Read bytes from an open file. More... | |
uint32_t | neo_file_write (uint8_t channel, const void *src, uint16_t len) |
Write bytes to an open file. More... | |
uint32_t | neo_file_size (uint8_t channel) |
Get the file's size, in bytes. More... | |
void | neo_file_set_size (uint8_t channel, uint32_t size) |
Set the file's size. More... | |
void | neo_file_rename_p (const neo_pstring_t *from, const neo_pstring_t *to) |
Rename file, using Pascal strings for the filenames. More... | |
void | neo_file_rename (const char *from, const char *to) |
Rename file, using C strings for the filenames. More... | |
void | neo_file_delete_p (const neo_pstring_t *filename) |
Delete file, using Pascal strings for the filename. More... | |
void | neo_file_delete (const char *filename) |
Delete file, using C strings for the filename. More... | |
void | neo_file_chdir_p (const neo_pstring_t *path) |
Change current working directory, using a Pascal string for the path. More... | |
void | neo_file_chdir (const char *path) |
Change current working directory, using a C string for the path. More... | |
void | neo_file_mkdir_p (const neo_pstring_t *path) |
Create directory, using a Pascal string for the path. More... | |
void | neo_file_mkdir (const char *path) |
Create directory, using a C string for the path. More... | |
void | neo_file_stat_p (const neo_pstring_t *path, neo_file_stat_t *st) |
Retrieve file information, using a Pascal string for the path. More... | |
void | neo_file_stat (const char *path, neo_file_stat_t *st) |
Retrieve file information, using a C string for the path. More... | |
void | neo_file_opendir_p (const neo_pstring_t *path) |
Open a directory for enumeration, using a Pascal string for the path. More... | |
void | neo_file_opendir (const char *path) |
Open a directory for enumeration, using a C string for the path. More... | |
void | neo_file_readdir_p (neo_pstring_t *path, neo_file_stat_t *st) |
Read the next file item from the directory, returning a Pascal string for the path. More... | |
void | neo_file_readdir (char *path, neo_file_stat_t *st) |
Read the next file item from the directory, returning a C string for the path. More... | |
void | neo_file_closedir (void) |
Close the directory opened with. More... | |
void | neo_file_copy_p (const neo_pstring_t *from, const neo_pstring_t *to) |
Copy file, using Pascal strings for the filenames. More... | |
void | neo_file_copy (const char *from, const char *to) |
Copy file, using C strings for the filenames. More... | |
void | neo_file_set_attr_p (const neo_pstring_t *path, uint8_t attr) |
Set file attributes, using a Pascal string for the filename. More... | |
void | neo_file_set_attr (const char *path, uint8_t attr) |
Set file attributes, using a C string for the filename. More... | |
bool | neo_file_eof (uint8_t channel) |
Check if file is at end of file. More... | |
void | neo_file_get_cwd (char *buffer, uint8_t length) |
Retrieve the current working directory. More... | |
void | neo_file_list_filtered_p (const neo_pstring_t *filter) |
Display a filtered listing of files in the current directory, using a Pascal string for the needle. More... | |
void | neo_file_list_filtered (const char *filter) |
Display a filtered listing of files in the current directory, using a C string for the needle. More... | |
#define NEO_FILE_ATTR_ARCHIVE NEO_FIOATTR_ARCHIVE |
#define NEO_FILE_ATTR_DIRECTORY NEO_FIOATTR_DIR |
#define NEO_FILE_ATTR_HIDDEN NEO_FIOATTR_HIDDEN |
#define NEO_FILE_ATTR_READ_ONLY NEO_FIOATTR_READONLY |
#define NEO_FILE_ATTR_SYSTEM NEO_FIOATTR_SYSTEM |
#define NEO_FILE_DESTINATION_GRAPHICS ((void*) 0xFFFF) |
#define NEO_FIOATTR_ARCHIVE 0x04 |
#define NEO_FIOATTR_DIR 0x01 |
#define NEO_FIOATTR_HIDDEN 0x10 |
#define NEO_FIOATTR_READONLY 0x08 |
#define NEO_FIOATTR_SYSTEM 0x02 |
#define NEO_FIOERROR_DENIED 0x21 |
#define NEO_FIOERROR_DISK_ERR 0x31 |
#define NEO_FIOERROR_EOF 0x02 |
#define NEO_FIOERROR_EXIST 0x22 |
#define NEO_FIOERROR_INT_ERR 0x32 |
#define NEO_FIOERROR_INVALID_DRIVE 0x13 |
#define NEO_FIOERROR_INVALID_NAME 0x14 |
#define NEO_FIOERROR_INVALID_OBJECT 0x23 |
#define NEO_FIOERROR_INVALID_PARAMETER 0x15 |
#define NEO_FIOERROR_LOCKED 0x25 |
#define NEO_FIOERROR_MKFS_ABORTED 0x41 |
#define NEO_FIOERROR_NO_FILE 0x11 |
#define NEO_FIOERROR_NO_FILESYSTEM 0x35 |
#define NEO_FIOERROR_NO_PATH 0x12 |
#define NEO_FIOERROR_NOT_ENABLED 0x34 |
#define NEO_FIOERROR_NOT_ENOUGH_CORE 0x43 |
#define NEO_FIOERROR_NOT_READY 0x33 |
#define NEO_FIOERROR_OK 0x00 |
#define NEO_FIOERROR_TIMEOUT 0x42 |
#define NEO_FIOERROR_TOO_MANY_OPEN_FILES 0x44 |
#define NEO_FIOERROR_UNIMPLEMENTED 0x03 |
#define NEO_FIOERROR_UNKNOWN 0x01 |
#define NEO_FIOERROR_WRITE_PROTECTED 0x24 |
typedef enum neo_file_mode neo_file_mode_t |
typedef struct neo_file_stat neo_file_stat_t |
enum neo_file_mode |
void neo_file_chdir | ( | const char * | path | ) |
Change current working directory, using a C string for the path.
path | Path (C string) |
Check errors with
void neo_file_chdir_p | ( | const neo_pstring_t * | path | ) |
Change current working directory, using a Pascal string for the path.
path | Path (Pascal string) |
Check errors with
void neo_file_close | ( | uint8_t | channel | ) |
void neo_file_closedir | ( | void | ) |
void neo_file_copy | ( | const char * | from, |
const char * | to | ||
) |
Copy file, using C strings for the filenames.
from | Old filename (C string) |
to | New filename (C string) |
Check errors with
void neo_file_copy_p | ( | const neo_pstring_t * | from, |
const neo_pstring_t * | to | ||
) |
Copy file, using Pascal strings for the filenames.
from | Old filename (Pascal string) |
to | New filename (Pascal string) |
Check errors with
void neo_file_delete | ( | const char * | filename | ) |
Delete file, using C strings for the filename.
Note that deleting an open file is undefined behaviour. In addition, directories can only be deleted if empty.
filename | Filename (C string) |
Check errors with
void neo_file_delete_p | ( | const neo_pstring_t * | filename | ) |
Delete file, using Pascal strings for the filename.
Note that deleting an open file is undefined behaviour. In addition, directories can only be deleted if empty.
filename | Filename (Pascal string) |
Check errors with
bool neo_file_eof | ( | uint8_t | channel | ) |
Check if file is at end of file.
channel | File channel ID |
void neo_file_get_cwd | ( | char * | buffer, |
uint8_t | length | ||
) |
Retrieve the current working directory.
buffer | Buffer to write the current working directory to. |
length | Length of buffer, in bytes. |
void neo_file_list_directory | ( | void | ) |
Display the listing of files in the current directory.
void neo_file_list_filtered | ( | const char * | filter | ) |
Display a filtered listing of files in the current directory, using a C string for the needle.
filter | Filename search needle (C string) |
void neo_file_list_filtered_p | ( | const neo_pstring_t * | filter | ) |
Display a filtered listing of files in the current directory, using a Pascal string for the needle.
filter | Filename search needle (Pascal string) |
void neo_file_load | ( | const char * | filename, |
void * | dest | ||
) |
Load a file into memory, using a C string for the filename.
To load a file into graphics memory, use
filename | Filename (C string) |
dest | Destination |
Check errors with
void neo_file_load_p | ( | const neo_pstring_t * | filename, |
void * | dest | ||
) |
Load a file into memory, using a Pascal string for the filename.
To load a file into graphics memory, use
filename | Filename (Pascal string) |
dest | Destination |
Check errors with
void neo_file_mkdir | ( | const char * | path | ) |
Create directory, using a C string for the path.
path | Path (C string) |
Check errors with
void neo_file_mkdir_p | ( | const neo_pstring_t * | path | ) |
Create directory, using a Pascal string for the path.
path | Path (Pascal string) |
Check errors with
void neo_file_open | ( | uint8_t | channel, |
const char * | filename, | ||
uint8_t | mode | ||
) |
Open a file channel, using a C string for the filename.
channel | File channel ID |
filename | Filename (C string) |
mode | Mode |
Check errors with
void neo_file_open_p | ( | uint8_t | channel, |
const neo_pstring_t * | filename, | ||
uint8_t | mode | ||
) |
Open a file channel, using a Pascal string for the filename.
channel | File channel ID |
filename | Filename (Pascal string) |
mode | Mode |
Check errors with
void neo_file_opendir | ( | const char * | path | ) |
Open a directory for enumeration, using a C string for the path.
path | Path (C string) |
Check errors with
void neo_file_opendir_p | ( | const neo_pstring_t * | path | ) |
Open a directory for enumeration, using a Pascal string for the path.
path | Path (Pascal string) |
Check errors with
uint16_t neo_file_read | ( | uint8_t | channel, |
void * | dest, | ||
uint16_t | len | ||
) |
Read bytes from an open file.
To read into graphics memory, use
channel | File channel ID |
dest | Destination |
len | Length, in bytes |
Check errors with
void neo_file_readdir | ( | char * | path, |
neo_file_stat_t * | st | ||
) |
Read the next file item from the directory, returning a C string for the path.
filename | Returned filename (C string) |
st | Stat information structure |
Check errors with
void neo_file_readdir_p | ( | neo_pstring_t * | path, |
neo_file_stat_t * | st | ||
) |
Read the next file item from the directory, returning a Pascal string for the path.
filename | Returned filename (Pascal string) |
st | Stat information structure |
Check errors with
void neo_file_rename | ( | const char * | from, |
const char * | to | ||
) |
Rename file, using C strings for the filenames.
from | Old filename (C string) |
to | New filename (C string) |
Check errors with
void neo_file_rename_p | ( | const neo_pstring_t * | from, |
const neo_pstring_t * | to | ||
) |
Rename file, using Pascal strings for the filenames.
from | Old filename (Pascal string) |
to | New filename (Pascal string) |
Check errors with
void neo_file_seek | ( | uint8_t | channel, |
uint32_t | pos | ||
) |
Seek a file.
channel | File channel ID |
pos | New file position |
Check errors with
void neo_file_set_attr | ( | const char * | path, |
uint8_t | attr | ||
) |
Set file attributes, using a C string for the filename.
path | Filename (C string) |
attr | New attributes |
Check errors with
void neo_file_set_attr_p | ( | const neo_pstring_t * | path, |
uint8_t | attr | ||
) |
Set file attributes, using a Pascal string for the filename.
path | Filename (Pascal string) |
attr | New attributes |
Check errors with
void neo_file_set_size | ( | uint8_t | channel, |
uint32_t | size | ||
) |
Set the file's size.
channel | File channel ID |
size | New file size, in bytes |
Check errors with
uint32_t neo_file_size | ( | uint8_t | channel | ) |
Get the file's size, in bytes.
channel | File channel ID |
Check errors with
void neo_file_stat | ( | const char * | path, |
neo_file_stat_t * | st | ||
) |
Retrieve file information, using a C string for the path.
path | Path (C string) |
st | Stat information structure |
Check errors with
void neo_file_stat_p | ( | const neo_pstring_t * | path, |
neo_file_stat_t * | st | ||
) |
Retrieve file information, using a Pascal string for the path.
path | Path (Pascal string) |
st | Stat information structure |
Check errors with
void neo_file_store | ( | const char * | filename, |
const void * | src, | ||
uint16_t | len | ||
) |
Store a file from memory, using a C string for the filename.
filename | Filename (Pascal string) |
src | Source |
len | Length, in bytes |
Check errors with
void neo_file_store_p | ( | const neo_pstring_t * | filename, |
const void * | src, | ||
uint16_t | len | ||
) |
Store a file from memory, using a Pascal string for the filename.
filename | Filename (Pascal string) |
src | Source |
len | Length, in bytes |
Check errors with
uint32_t neo_file_tell | ( | uint8_t | channel | ) |
Tell a file's position.
channel | File channel ID |
Check errors with
uint32_t neo_file_write | ( | uint8_t | channel, |
const void * | src, | ||
uint16_t | len | ||
) |
Write bytes to an open file.
channel | File channel ID |
src | Source |
len | Length, in bytes |
Check errors with