dfs_file.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * File : dfs_file.c
  3. * This file is part of Device File System in RT-Thread RTOS
  4. * COPYRIGHT (C) 2004-2011, RT-Thread Development Team
  5. *
  6. * The license and distribution terms for this file may be
  7. * found in the file LICENSE in this distribution or at
  8. * http://www.rt-thread.org/license/LICENSE.
  9. *
  10. * Change Logs:
  11. * Date Author Notes
  12. * 2005-01-26 Bernard The first version.
  13. */
  14. #ifndef __DFS_RAW_H__
  15. #define __DFS_RAW_H__
  16. #include <dfs_def.h>
  17. #include <dfs.h>
  18. #include <dfs_fs.h>
  19. int dfs_file_open(struct dfs_fd *fd, const char *path, int flags);
  20. int dfs_file_close(struct dfs_fd *fd);
  21. int dfs_file_ioctl(struct dfs_fd *fd, int cmd, void *args);
  22. int dfs_file_read(struct dfs_fd *fd, void *buf, rt_size_t len);
  23. int dfs_file_getdents(struct dfs_fd *fd, struct dirent *dirp, rt_size_t nbytes);
  24. int dfs_file_unlink(const char *path);
  25. int dfs_file_write(struct dfs_fd *fd, const void *buf, rt_size_t len);
  26. int dfs_file_lseek(struct dfs_fd *fd, rt_off_t offset);
  27. int dfs_file_stat(const char *path, struct stat *buf);
  28. int dfs_file_rename(const char *oldpath, const char *newpath);
  29. #endif