Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
dirent.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2018 Intel Corporation
3 * Copyright (c) 2024 Tenstorrent AI ULC
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 */
7
8#ifndef ZEPHYR_INCLUDE_POSIX_DIRENT_H_
9#define ZEPHYR_INCLUDE_POSIX_DIRENT_H_
10
12#include <zephyr/toolchain.h>
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18#if (_POSIX_C_SOURCE >= 200809L) || (_XOPEN_SOURCE >= 700)
19int alphasort(const struct dirent **d1, const struct dirent **d2);
20#endif
21int closedir(DIR *dirp);
22#if (_POSIX_C_SOURCE >= 200809L) || (_XOPEN_SOURCE >= 700)
23int dirfd(DIR *dirp);
24#endif
25DIR *fdopendir(int fd);
26DIR *opendir(const char *dirname);
27struct dirent *readdir(DIR *dirp);
28#if (_POSIX_C_SOURCE >= 199506L) || (_XOPEN_SOURCE >= 500)
29int readdir_r(DIR *ZRESTRICT dirp, struct dirent *ZRESTRICT entry,
30 struct dirent **ZRESTRICT result);
31#endif
32void rewinddir(DIR *dirp);
33#if (_POSIX_C_SOURCE >= 200809L) || (_XOPEN_SOURCE >= 700)
34int scandir(const char *dir, struct dirent ***namelist, int (*sel)(const struct dirent *),
35 int (*compar)(const struct dirent **, const struct dirent **));
36#endif
37#if defined(_XOPEN_SOURCE)
38void seekdir(DIR *dirp, long loc);
39long telldir(DIR *dirp);
40#endif
41
42#ifdef __cplusplus
43}
44#endif
45
46#endif /* ZEPHYR_INCLUDE_POSIX_DIRENT_H_ */
DIR * fdopendir(int fd)
struct dirent * readdir(DIR *dirp)
int closedir(DIR *dirp)
void rewinddir(DIR *dirp)
DIR * opendir(const char *dirname)
#define ZRESTRICT
Definition common.h:36
Definition dirent.h:28
void DIR
Definition dirent.h:26
Macros to abstract toolchain specific capabilities.