2 * Copyright 2002-2008, Axel Dörfler, axeld@pinc-software.de.
3 * Distributed under the terms of the MIT License.
14 #include <dirent_private.h>
15 #include <errno_private.h>
17 #include <syscall_utils.h>
21 fs_create_index(dev_t device
, const char *name
, uint32 type
, uint32 flags
)
23 status_t status
= _kern_create_index(device
, name
, type
, flags
);
25 RETURN_AND_SET_ERRNO(status
);
30 fs_remove_index(dev_t device
, const char *name
)
32 status_t status
= _kern_remove_index(device
, name
);
34 RETURN_AND_SET_ERRNO(status
);
39 fs_stat_index(dev_t device
, const char *name
, struct index_info
*indexInfo
)
43 status_t status
= _kern_read_index_stat(device
, name
, &stat
);
45 indexInfo
->type
= stat
.st_type
;
46 indexInfo
->size
= stat
.st_size
;
47 indexInfo
->modification_time
= stat
.st_mtime
;
48 indexInfo
->creation_time
= stat
.st_crtime
;
49 indexInfo
->uid
= stat
.st_uid
;
50 indexInfo
->gid
= stat
.st_gid
;
53 RETURN_AND_SET_ERRNO(status
);
58 fs_open_index_dir(dev_t device
)
62 int fd
= _kern_open_index_dir(device
);
68 // allocate the DIR structure
69 if ((dir
= __create_dir_struct(fd
)) == NULL
) {
79 fs_close_index_dir(DIR *dir
)
86 fs_read_index_dir(DIR *dir
)
93 fs_rewind_index_dir(DIR *dir
)