📄 fs.h
字号:
#ifndef FS_H
#define FS_H
#include "yaffsfs.h"
inline int open(const char* pathname, int flags, int mode)
{
return yaffs_open(pathname, flags, mode);
}
inline int close(int fd)
{
return yaffs_close(fd);
}
inline int unlink(const char *pathname)
{
return yaffs_unlink(pathname);
}
inline int read(int fd, void *buf, unsigned int nbyte)
{
return yaffs_read(fd, buf, nbyte);
}
inline int write(int fd, const void *buf, unsigned int nbyte)
{
return yaffs_write(fd, buf, nbyte);
}
typedef yaffs_DIR DIR;
inline DIR* opendir(const char *pathname)
{
return yaffs_opendir(pathname);
}
inline int closedir(DIR* dp)
{
return yaffs_closedir(dp);
}
inline int mkdir(const char *pathname, mode_t mode)
{
return yaffs_mkdir(pathname, mode);
}
inline int rmdir(const char *pathname)
{
return yaffs_rmdir(pathname);
}
typedef yaffs_dirent direct;
inline direct *yaffs_readdir(DIR *dp)
{
return yaffs_readdir(dp);
}
typedef struct yaffs_stat stat;
inline int fstat(int fd, stat *sbuf)
{
return yaffs_fstat(fd, sbuf);
}
inline off_t lseek(int fd, off_t offset, int whence)
{
return yaffs_lseek(fd, offset, whence);
}
#endif //FS_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -