dfs.h 894 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * File : dfs.h
  3. * This file is part of Device File System in RT-Thread RTOS
  4. * COPYRIGHT (C) 2004-2012, 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-02-22 Bernard The first version.
  13. */
  14. #ifndef __DFS_H__
  15. #define __DFS_H__
  16. #include <string.h>
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. #define NO_WORKING_DIR "system does not support working directory\n"
  21. char *dfs_normalize_path(const char *directory, const char *filename);
  22. const char *dfs_subdir(const char *directory, const char *filename);
  23. /* FD APIs */
  24. int fd_new(void);
  25. struct dfs_fd *fd_get(int fd);
  26. void fd_put(struct dfs_fd *fd);
  27. int fd_is_open(const char *pathname);
  28. #ifdef __cplusplus
  29. }
  30. #endif
  31. #endif