1/* File System attributes 2** 3** Distributed under the terms of the MIT License. 4*/ 5#ifndef _FSSH_FS_ATTR_H 6#define _FSSH_FS_ATTR_H 7 8 9#include "fssh_defs.h" 10#include "fssh_dirent.h" 11 12 13typedef struct fssh_attr_info { 14 uint32_t type; 15 fssh_off_t size; 16} fssh_attr_info; 17 18 19#ifdef __cplusplus 20extern "C" { 21#endif 22 23extern fssh_ssize_t fssh_fs_read_attr(int fd, const char *attribute, 24 uint32_t type, fssh_off_t pos, void *buffer, 25 fssh_size_t readBytes); 26extern fssh_ssize_t fssh_fs_write_attr(int fd, const char *attribute, 27 uint32_t type, fssh_off_t pos, const void *buffer, 28 fssh_size_t readBytes); 29extern int fssh_fs_remove_attr(int fd, const char *attribute); 30extern int fssh_fs_stat_attr(int fd, const char *attribute, 31 struct fssh_attr_info *attrInfo); 32 33// ToDo: the following three functions are not part of the R5 API, and 34// are only preliminary - they may change or be removed at any point 35//extern int fssh_fs_open_attr(const char *path, const char *attribute, uint32_t type, int openMode); 36extern int fssh_fs_open_attr(int fd, const char *attribute, 37 uint32_t type, int openMode); 38extern int fssh_fs_close_attr(int fd); 39 40extern fssh_DIR *fssh_fs_open_attr_dir(const char *path); 41extern fssh_DIR *fssh_fs_fopen_attr_dir(int fd); 42extern int fssh_fs_close_attr_dir(fssh_DIR *dir); 43extern struct fssh_dirent *fssh_fs_read_attr_dir(fssh_DIR *dir); 44extern void fssh_fs_rewind_attr_dir(fssh_DIR *dir); 45 46#ifdef __cplusplus 47} 48#endif 49 50#endif /* _FSSH_FS_ATTR_H */ 51