Zephyr API Documentation 4.0.0-rc3
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 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6#ifndef ZEPHYR_INCLUDE_POSIX_DIRENT_H_
7#define ZEPHYR_INCLUDE_POSIX_DIRENT_H_
8
9#include <limits.h>
10
12
13#ifdef CONFIG_POSIX_FILE_SYSTEM
14#include <zephyr/fs/fs.h>
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20typedef void DIR;
21
22struct dirent {
23 unsigned int d_ino;
24 char d_name[PATH_MAX + 1];
25};
26
27/* Directory related operations */
28DIR *opendir(const char *dirname);
29int closedir(DIR *dirp);
30struct dirent *readdir(DIR *dirp);
31int readdir_r(DIR *ZRESTRICT dirp, struct dirent *ZRESTRICT entry,
32 struct dirent **ZRESTRICT result);
33
34#ifdef __cplusplus
35}
36#endif
37
38#endif /* CONFIG_POSIX_FILE_SYSTEM */
39
40#endif /* ZEPHYR_INCLUDE_POSIX_DIRENT_H_ */
#define ZRESTRICT
Definition common.h:36
#define PATH_MAX
Definition limits.h:83