64 #ifndef CFS_CONF_OFFSET_TYPE 71 #define CFS_DIR_ENTRY_NAME_LENGTH 32 80 char name[CFS_DIR_ENTRY_NAME_LENGTH];
132 #define CFS_SEEK_SET 0 141 #define CFS_SEEK_CUR 1 150 #define CFS_SEEK_END 2 172 int cfs_open(
const char *name,
int flags);
198 int cfs_read(
int fd,
void *buf,
unsigned int len);
213 int cfs_write(
int fd,
const void *buf,
unsigned int len);
257 int cfs_opendir(
struct cfs_dir *dirp,
const char *name);
271 int cfs_readdir(
struct cfs_dir *dirp,
struct cfs_dirent *dirent);
int cfs_open(const char *name, int flags)
Open a file.
int cfs_remove(const char *name)
Remove a file.
cfs_offset_t cfs_seek(int fd, cfs_offset_t offset, int whence)
Seek to a specified position in an open file.
int cfs_write(int fd, const void *buf, unsigned int len)
Write data to an open file.
int cfs_offset_t
CFS directory entry name length.
int cfs_opendir(struct cfs_dir *dirp, const char *name)
Open a directory for reading directory entries.
void cfs_close(int fd)
Close an open file.
int cfs_readdir(struct cfs_dir *dirp, struct cfs_dirent *dirent)
Read a directory entry.
int cfs_read(int fd, void *buf, unsigned int len)
Read data from an open file.
void cfs_closedir(struct cfs_dir *dirp)
Close a directory opened with cfs_opendir().