Rename project from TinyDFS to MouseFS

- Renamed TinyDFS.h to MouseFS.h
- Updated all type names: TinyDFS -> MouseFS, TinyDFS_Entity -> MouseFS_Entity, TinyDFS_Result -> MouseFS_Result
- Updated all enum values: TINYDFS_RESULT_* -> MOUSEFS_RESULT_*
- Updated all function names: tinydfs_* -> mousefs_*
- Updated all variable names: tdfs -> mfs
- Updated references in all source files, headers, examples, and documentation
- Updated Makefile build targets: tinydfs_* -> mousefs_*
This commit is contained in:
Claude
2025-11-10 18:00:05 +00:00
parent debbd08ce6
commit 1a297989d4
9 changed files with 425 additions and 425 deletions
+56
View File
@@ -0,0 +1,56 @@
#ifndef MOUSEFS_INCLUDED
#define MOUSEFS_INCLUDED
#include <stdint.h>
#include <stdbool.h>
#ifdef _WIN32
#include <winsock2.h>
#else
#include <poll.h>
#endif
typedef struct MouseFS MouseFS;
typedef struct {
char name[128]; // TODO: Implement a proper name length
bool is_dir;
} MouseFS_Entity;
typedef enum {
MOUSEFS_RESULT_EMPTY,
MOUSEFS_RESULT_CREATE_ERROR,
MOUSEFS_RESULT_CREATE_SUCCESS,
MOUSEFS_RESULT_DELETE_ERROR,
MOUSEFS_RESULT_DELETE_SUCCESS,
MOUSEFS_RESULT_LIST_ERROR,
MOUSEFS_RESULT_LIST_SUCCESS,
MOUSEFS_RESULT_READ_ERROR,
MOUSEFS_RESULT_READ_SUCCESS,
MOUSEFS_RESULT_WRITE_ERROR,
MOUSEFS_RESULT_WRITE_SUCCESS,
} MouseFS_ResultType;
typedef struct {
MouseFS_ResultType type;
int num_entities;
MouseFS_Entity *entities;
} MouseFS_Result;
MouseFS *mousefs_init(char *addr, uint16_t port);
void mousefs_free(MouseFS *mfs);
void mousefs_wait(MouseFS *mfs, int opidx, MouseFS_Result *result, int timeout);
bool mousefs_isdone(MouseFS *mfs, int opidx, MouseFS_Result *result);
int mousefs_process_events(MouseFS *mfs, void **contexts, struct pollfd *polled, int num_polled);
int mousefs_submit_create (MouseFS *mfs, char *path, int path_len, bool is_dir, unsigned int chunk_size);
int mousefs_submit_delete (MouseFS *mfs, char *path, int path_len);
int mousefs_submit_list (MouseFS *mfs, char *path, int path_len);
int mousefs_submit_read (MouseFS *mfs, char *path, int path_len, int off, void *dst, int len);
int mousefs_submit_write (MouseFS *mfs, char *path, int path_len, int off, void *src, int len);
void mousefs_result_free(MouseFS_Result *result);
#endif // MOUSEFS_INCLUDED
-56
View File
@@ -1,56 +0,0 @@
#ifndef TINYDFS_INCLUDED
#define TINYDFS_INCLUDED
#include <stdint.h>
#include <stdbool.h>
#ifdef _WIN32
#include <winsock2.h>
#else
#include <poll.h>
#endif
typedef struct TinyDFS TinyDFS;
typedef struct {
char name[128]; // TODO: Implement a proper name length
bool is_dir;
} TinyDFS_Entity;
typedef enum {
TINYDFS_RESULT_EMPTY,
TINYDFS_RESULT_CREATE_ERROR,
TINYDFS_RESULT_CREATE_SUCCESS,
TINYDFS_RESULT_DELETE_ERROR,
TINYDFS_RESULT_DELETE_SUCCESS,
TINYDFS_RESULT_LIST_ERROR,
TINYDFS_RESULT_LIST_SUCCESS,
TINYDFS_RESULT_READ_ERROR,
TINYDFS_RESULT_READ_SUCCESS,
TINYDFS_RESULT_WRITE_ERROR,
TINYDFS_RESULT_WRITE_SUCCESS,
} TinyDFS_ResultType;
typedef struct {
TinyDFS_ResultType type;
int num_entities;
TinyDFS_Entity *entities;
} TinyDFS_Result;
TinyDFS *tinydfs_init(char *addr, uint16_t port);
void tinydfs_free(TinyDFS *tdfs);
void tinydfs_wait(TinyDFS *tdfs, int opidx, TinyDFS_Result *result, int timeout);
bool tinydfs_isdone(TinyDFS *tdfs, int opidx, TinyDFS_Result *result);
int tinydfs_process_events(TinyDFS *tdfs, void **contexts, struct pollfd *polled, int num_polled);
int tinydfs_submit_create (TinyDFS *tdfs, char *path, int path_len, bool is_dir, unsigned int chunk_size);
int tinydfs_submit_delete (TinyDFS *tdfs, char *path, int path_len);
int tinydfs_submit_list (TinyDFS *tdfs, char *path, int path_len);
int tinydfs_submit_read (TinyDFS *tdfs, char *path, int path_len, int off, void *dst, int len);
int tinydfs_submit_write (TinyDFS *tdfs, char *path, int path_len, int off, void *src, int len);
void tinydfs_result_free(TinyDFS_Result *result);
#endif // TINYDFS_INCLUDED