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