mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-02 01:22:25 +00:00
From POSIX http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/dirent.h.html """ The <dirent.h> header shall define the following type: DIR ... also define the structure dirent """ etc. Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
43 lines
995 B
C
43 lines
995 B
C
/*
|
|
* Copyright (c) 2018 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
#ifndef ZEPHYR_INCLUDE_POSIX_UNISTD_H_
|
|
#define ZEPHYR_INCLUDE_POSIX_UNISTD_H_
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include "sys/types.h"
|
|
#include "sys/stat.h"
|
|
|
|
#ifdef CONFIG_POSIX_FS
|
|
#include <fs.h>
|
|
|
|
typedef unsigned int mode_t;
|
|
|
|
/* File related operations */
|
|
extern int open(const char *name, int flags);
|
|
extern int close(int file);
|
|
extern ssize_t write(int file, char *buffer, unsigned int count);
|
|
extern ssize_t read(int file, char *buffer, unsigned int count);
|
|
extern int lseek(int file, int offset, int whence);
|
|
|
|
/* File System related operations */
|
|
extern int rename(const char *old, const char *newp);
|
|
extern int unlink(const char *path);
|
|
extern int stat(const char *path, struct stat *buf);
|
|
extern int mkdir(const char *path, mode_t mode);
|
|
#endif
|
|
|
|
unsigned sleep(unsigned int seconds);
|
|
int usleep(useconds_t useconds);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* ZEPHYR_INCLUDE_POSIX_UNISTD_H_ */
|