fs_attr.h revision 648f0d5f
1/*
2 * Copyright 2002-2009, Haiku Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
4 */
5#ifndef _FS_ATTR_H
6#define	_FS_ATTR_H
7
8
9#include <OS.h>
10#include <dirent.h>
11
12
13typedef struct attr_info {
14	uint32	type;
15	off_t	size;
16} attr_info;
17
18
19#ifdef  __cplusplus
20extern "C" {
21#endif
22
23
24extern ssize_t	fs_read_attr(int fd, const char *attribute, uint32 type,
25					off_t pos, void *buffer, size_t readBytes);
26extern ssize_t	fs_write_attr(int fd, const char *attribute, uint32 type,
27					off_t pos, const void *buffer, size_t readBytes);
28extern int		fs_remove_attr(int fd, const char *attribute);
29extern int		fs_stat_attr(int fd, const char *attribute,
30					struct attr_info *attrInfo);
31
32extern int		fs_open_attr(const char *path, const char *attribute,
33					uint32 type, int openMode);
34extern int		fs_fopen_attr(int fd, const char *attribute, uint32 type,
35					int openMode);
36extern int		fs_close_attr(int fd);
37
38extern DIR		*fs_open_attr_dir(const char *path);
39extern DIR		*fs_lopen_attr_dir(const char *path);
40extern DIR		*fs_fopen_attr_dir(int fd);
41extern int		fs_close_attr_dir(DIR *dir);
42extern struct dirent *fs_read_attr_dir(DIR *dir);
43extern void		fs_rewind_attr_dir(DIR *dir);
44
45#ifdef  __cplusplus
46}
47#endif
48
49#endif	/* _FS_ATTR_H */
50