/** * @file oh_fs.h * @version $Id$ * * The header file that has the subset of POSIX filesystem functions. */ #ifndef _OH_FS_H_ #define _OH_FS_H_ #include "oh_port.h" #include "oh_fsa.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #ifndef oh_fs_open extern oh_int oh_fs_open(const oh_char *path, oh_int flags); #endif /* oh_fs_open */ #ifndef oh_fs_close extern oh_int oh_fs_close(oh_int fd); #endif /* oh_fs_close */ #ifndef oh_fs_read extern oh_long oh_fs_read(oh_int fd, oh_void *buf, oh_ulong count); #endif /* oh_fs_read */ #ifndef oh_fs_write extern oh_long oh_fs_write(oh_int fd, const oh_void *buf, oh_ulong count); #endif /* oh_fs_write */ #ifndef oh_fs_lseek extern oh_long oh_fs_lseek(oh_int fd, oh_long offset, oh_int whence); #endif /* oh_fs_lseek */ #ifndef oh_fs_ftruncate extern oh_int oh_fs_ftruncate(oh_int fd, oh_long length); #endif /* oh_fs_ftruncate */ #ifndef oh_fs_fsync extern oh_int oh_fs_fsync(oh_int fd); #endif /* oh_fs_fsync */ #ifndef oh_fs_fstat extern oh_int oh_fs_fstat(oh_int fd, oh_fs_stat_t *buf); #endif /* oh_fs_fstat */ #ifndef oh_fs_rename extern oh_int oh_fs_rename(const oh_char *oldpath, const oh_char *newpath); #endif /* oh_fs_rename */ #ifndef oh_fs_unlink extern oh_int oh_fs_unlink(const oh_char *path); #endif /* oh_fs_unlink */ #ifndef oh_fs_realpath extern oh_char *oh_fs_realpath(const oh_char *path, oh_char *respath, oh_ulong size); #endif /* oh_fs_realpath */ #ifndef oh_fs_getcwd extern oh_char *oh_fs_getcwd(oh_char *buf, oh_ulong size); #endif /* oh_fs_getcwd */ #ifndef oh_fs_chdir extern oh_int oh_fs_chdir(const oh_char *path); #endif /* oh_fs_chdir */ #ifndef oh_fs_mkdir extern oh_int oh_fs_mkdir(const oh_char *path); #endif /* oh_fs_mkdir */ #ifndef oh_fs_rmdir extern oh_int oh_fs_rmdir(const oh_char *path); #endif /* oh_fs_rmdir */ #ifndef oh_fs_opendir extern oh_fs_dir_t *oh_fs_opendir(const oh_char *path); #endif /* oh_fs_opendir */ #ifndef oh_fs_readdir extern oh_fs_dirent_t *oh_fs_readdir(oh_fs_dir_t *dir); #endif /* oh_fs_readdir */ #ifndef oh_fs_closedir extern oh_int oh_fs_closedir(oh_fs_dir_t *dir); #endif /* oh_fs_closedir */ #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* _OH_FS_H_ */