2009-07-29 04:34:44 +04:00
|
|
|
/*
|
2011-08-11 01:08:00 +04:00
|
|
|
* Copyright 2002-2011, Haiku Inc. All Rights Reserved.
|
2009-07-29 04:34:44 +04:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
2002-09-24 20:02:53 +04:00
|
|
|
#ifndef _FS_ATTR_H
|
|
|
|
#define _FS_ATTR_H
|
|
|
|
|
2003-01-29 17:45:15 +03:00
|
|
|
|
2002-09-24 20:02:53 +04:00
|
|
|
#include <OS.h>
|
|
|
|
#include <dirent.h>
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct attr_info {
|
|
|
|
uint32 type;
|
|
|
|
off_t size;
|
|
|
|
} attr_info;
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2009-07-29 04:34:44 +04:00
|
|
|
extern ssize_t fs_read_attr(int fd, const char *attribute, uint32 type,
|
|
|
|
off_t pos, void *buffer, size_t readBytes);
|
|
|
|
extern ssize_t fs_write_attr(int fd, const char *attribute, uint32 type,
|
|
|
|
off_t pos, const void *buffer, size_t readBytes);
|
2002-09-24 20:02:53 +04:00
|
|
|
extern int fs_remove_attr(int fd, const char *attribute);
|
2009-07-29 04:34:44 +04:00
|
|
|
extern int fs_stat_attr(int fd, const char *attribute,
|
|
|
|
struct attr_info *attrInfo);
|
2002-09-24 20:02:53 +04:00
|
|
|
|
2009-07-29 04:34:44 +04:00
|
|
|
extern int fs_open_attr(const char *path, const char *attribute,
|
|
|
|
uint32 type, int openMode);
|
|
|
|
extern int fs_fopen_attr(int fd, const char *attribute, uint32 type,
|
|
|
|
int openMode);
|
2002-09-24 20:02:53 +04:00
|
|
|
extern int fs_close_attr(int fd);
|
|
|
|
|
|
|
|
extern DIR *fs_open_attr_dir(const char *path);
|
2011-08-11 01:08:00 +04:00
|
|
|
extern DIR *fs_lopen_attr_dir(const char *path);
|
2002-09-24 20:02:53 +04:00
|
|
|
extern DIR *fs_fopen_attr_dir(int fd);
|
2002-10-16 20:17:28 +04:00
|
|
|
extern int fs_close_attr_dir(DIR *dir);
|
|
|
|
extern struct dirent *fs_read_attr_dir(DIR *dir);
|
|
|
|
extern void fs_rewind_attr_dir(DIR *dir);
|
2002-09-24 20:02:53 +04:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2011-08-11 01:08:00 +04:00
|
|
|
|
2002-09-24 20:02:53 +04:00
|
|
|
#endif /* _FS_ATTR_H */
|