From 4f8805869c469cb1b3685e03c3ea34d7654b5cb7 Mon Sep 17 00:00:00 2001 From: Ben Bridle Date: Fri, 22 Nov 2024 16:04:20 +1300 Subject: Implement file device There is still a small amount of work to be done on the file device: - Read file size only when requested - Hide '.' and '..' directories - Resize files --- arm9/source/types/pathbuf.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 arm9/source/types/pathbuf.h (limited to 'arm9/source/types/pathbuf.h') diff --git a/arm9/source/types/pathbuf.h b/arm9/source/types/pathbuf.h new file mode 100644 index 0000000..7fd7251 --- /dev/null +++ b/arm9/source/types/pathbuf.h @@ -0,0 +1,18 @@ +#include + +#ifndef PATHBUF_H_ + #define PATHBUF_H_ + + typedef struct { + u8 mem[255]; + u8 p; + } PathBuf; + + u8 pb_read(PathBuf *buf); + void pb_clear(PathBuf *buf); + void pb_reset(PathBuf *buf, bool to_name); + bool pb_push_byte(PathBuf *buf, u8 byte); + bool pb_is_terminated(PathBuf *buf); + void pb_populate(PathBuf *buf, u8 *path); + +#endif -- cgit v1.2.3-70-g09d2