Go to the documentation of this file.
25 #define NEO_FILE_DESTINATION_GRAPHICS ((void*) 0xFFFF)
32 #define NEO_FIOATTR_DIR 0x01
33 #define NEO_FIOATTR_SYSTEM 0x02
34 #define NEO_FIOATTR_ARCHIVE 0x04
35 #define NEO_FIOATTR_READONLY 0x08
36 #define NEO_FIOATTR_HIDDEN 0x10
38 #define NEO_FIOERROR_OK 0x00
39 #define NEO_FIOERROR_UNKNOWN 0x01
40 #define NEO_FIOERROR_EOF 0x02
41 #define NEO_FIOERROR_UNIMPLEMENTED 0x03
42 #define NEO_FIOERROR_NO_FILE 0x11
43 #define NEO_FIOERROR_NO_PATH 0x12
44 #define NEO_FIOERROR_INVALID_DRIVE 0x13
45 #define NEO_FIOERROR_INVALID_NAME 0x14
46 #define NEO_FIOERROR_INVALID_PARAMETER 0x15
47 #define NEO_FIOERROR_DENIED 0x21
48 #define NEO_FIOERROR_EXIST 0x22
49 #define NEO_FIOERROR_INVALID_OBJECT 0x23
50 #define NEO_FIOERROR_WRITE_PROTECTED 0x24
51 #define NEO_FIOERROR_LOCKED 0x25
52 #define NEO_FIOERROR_DISK_ERR 0x31
53 #define NEO_FIOERROR_INT_ERR 0x32
54 #define NEO_FIOERROR_NOT_READY 0x33
55 #define NEO_FIOERROR_NOT_ENABLED 0x34
56 #define NEO_FIOERROR_NO_FILESYSTEM 0x35
57 #define NEO_FIOERROR_MKFS_ABORTED 0x41
58 #define NEO_FIOERROR_TIMEOUT 0x42
59 #define NEO_FIOERROR_NOT_ENOUGH_CORE 0x43
60 #define NEO_FIOERROR_TOO_MANY_OPEN_FILES 0x44
63 #define NEO_FILE_ATTR_DIRECTORY NEO_FIOATTR_DIR
64 #define NEO_FILE_ATTR_SYSTEM NEO_FIOATTR_SYSTEM
65 #define NEO_FILE_ATTR_ARCHIVE NEO_FIOATTR_ARCHIVE
66 #define NEO_FILE_ATTR_READ_ONLY NEO_FIOATTR_READONLY
67 #define NEO_FILE_ATTR_HIDDEN NEO_FIOATTR_HIDDEN
void neo_file_open(uint8_t channel, const char *filename, uint8_t mode)
Open a file channel, using a C string for the filename.
void neo_file_load_p(const neo_pstring_t *filename, void *dest)
Load a file into memory, using a Pascal string for the filename.
::uint16_t uint16_t
Definition: cstdint:22
void neo_file_seek(uint8_t channel, uint32_t pos)
Seek a file.
void neo_file_mkdir_p(const neo_pstring_t *path)
Create directory, using a Pascal string for the path.
void neo_file_copy_p(const neo_pstring_t *from, const neo_pstring_t *to)
Copy file, using Pascal strings for the filenames.
@ NEO_FILE_READ_WRITE
Definition: file.h:21
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.
void neo_file_chdir(const char *path)
Change current working directory, using a C string for the path.
void neo_file_rename(const char *from, const char *to)
Rename file, using C strings for the filenames.
void neo_file_opendir(const char *path)
Open a directory for enumeration, using a C string for the path.
void neo_file_load(const char *filename, void *dest)
Load a file into memory, using a C string for the filename.
struct neo_file_stat neo_file_stat_t
uint8_t uint16_t uint16_t length
Definition: bios.h:181
::uint8_t uint8_t
Definition: cstdint:21
char to
Definition: nesdoug.h:55
uint32_t neo_file_write(uint8_t channel, const void *src, uint16_t len)
Write bytes to an open file.
char char char attr
Definition: neslib.h:85
void neo_file_chdir_p(const neo_pstring_t *path)
Change current working directory, using a Pascal string for the path.
void neo_file_set_attr(const char *path, uint8_t attr)
Set file attributes, using a C string for the filename.
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.
void neo_file_rename_p(const neo_pstring_t *from, const neo_pstring_t *to)
Rename file, using Pascal strings for the filenames.
@ NEO_FILE_CREATE
Definition: file.h:22
char channel
Definition: famitone2.h:31
@ NEO_FILE_WRITE
Definition: file.h:20
const void * src
Definition: memory.h:57
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.
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.
void neo_file_list_directory(void)
Display the listing of files in the current directory.
@ NEO_FILE_READ
Definition: file.h:19
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.
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.
uint32_t size
Definition: file.h:28
unsigned size
Definition: neslib.h:185
void neo_file_close(uint8_t channel)
Close a file channel.
void neo_file_set_size(uint8_t channel, uint32_t size)
Set the file's size.
bool neo_file_eof(uint8_t channel)
Check if file is at end of file.
uint32_t neo_file_size(uint8_t channel)
Get the file's size, in bytes.
void neo_file_delete_p(const neo_pstring_t *filename)
Delete file, using Pascal strings for the filename.
void neo_file_mkdir(const char *path)
Create directory, using a C string for the path.
void neo_file_delete(const char *filename)
Delete file, using C strings for the filename.
uint32_t neo_file_tell(uint8_t channel)
Tell a file's position.
enum neo_file_mode neo_file_mode_t
void neo_file_set_attr_p(const neo_pstring_t *path, uint8_t attr)
Set file attributes, using a Pascal string for the filename.
uint8_t attr
Definition: file.h:29
void neo_file_opendir_p(const neo_pstring_t *path)
Open a directory for enumeration, using a Pascal string for the path.
neo_file_mode
Definition: file.h:18
::uint32_t uint32_t
Definition: cstdint:23
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.
void neo_file_copy(const char *from, const char *to)
Copy file, using C strings for the filenames.
const void uint16_t uint8_t mode
Definition: memory.h:58
void neo_file_get_cwd(char *buffer, uint8_t length)
Retrieve the current working directory.
void neo_file_closedir(void)
Close the directory opened with.
uint16_t neo_file_read(uint8_t channel, void *dest, uint16_t len)
Read bytes from an open file.
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.
char len
Definition: nesdoug.h:26
void neo_file_stat(const char *path, neo_file_stat_t *st)
Retrieve file information, using a C string for the path.