dfs_file.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. +------------------------------------------------------------------------------
  3. | Project : Device Filesystem
  4. +------------------------------------------------------------------------------
  5. | Copyright 2004, 2005 www.fayfayspace.org.
  6. | All rights reserved.
  7. |------------------------------------------------------------------------------
  8. | File : dfs_raw.h, the raw APIs of Device FileSystem
  9. |------------------------------------------------------------------------------
  10. | Chang Logs:
  11. | Date Author Notes
  12. | 2005-01-26 ffxz The first version
  13. +------------------------------------------------------------------------------
  14. */
  15. #ifndef __DFS_RAW_H__
  16. #define __DFS_RAW_H__
  17. #include <dfs_def.h>
  18. #include <dfs.h>
  19. #include <dfs_fs.h>
  20. int dfs_file_open(struct dfs_fd* fd, const char *path, int flags);
  21. int dfs_file_close(struct dfs_fd* fd);
  22. int dfs_file_ioctl(struct dfs_fd* fd, int cmd, void *args);
  23. int dfs_file_read(struct dfs_fd* fd, void *buf, rt_size_t len);
  24. int dfs_file_getdents(struct dfs_fd* fd, struct dirent* dirp, rt_size_t nbytes);
  25. int dfs_file_unlink(const char *path);
  26. int dfs_file_write(struct dfs_fd* fd, const void *buf, rt_size_t len);
  27. int dfs_file_lseek(struct dfs_fd* fd, rt_off_t offset);
  28. int dfs_file_stat(const char *path, struct stat *buf);
  29. int dfs_file_rename(const char* oldpath, const char* newpath);
  30. #endif