#include <io.h>
Standard C runtime file interface to Nut/OS devices.
Defines | |
#define | _O_RDONLY 0x0000 |
#define | _O_WRONLY 0x0001 |
#define | _O_RDWR 0x0002 |
#define | _O_APPEND 0x0008 |
#define | _O_CREAT 0x0100 |
#define | _O_TRUNC 0x0200 |
#define | _O_EXCL 0x0400 |
#define | _O_TEXT 0x4000 |
#define | _O_BINARY 0x8000 |
Functions | |
int | _close (int fd) |
Close a file, device or socket. | |
long | _filelength (int fd) |
Return the length of a file. | |
int | _ioctl (int fd, int cmd, void *data) |
Perform device specific control functions. | |
int | _open (CONST char *name, int mode) |
Open a file. | |
int | _read (int fd, void *buffer, unsigned int count) |
Read data from a file, device or socket. | |
int | _seek (int fd, long offset, int origin) |
Move read/write position of a file. | |
long | _tell (int fd) |
Return the read/write position of a stream. | |
int | _write (int fd, CONST void *data, unsigned int count) |
Write data to a file, device or socket. | |
int | _write_P (int fd, PGM_P data, unsigned int count) |
Writes data from program space to a file, device or socket. |
|
Read only. |
|
Write only. |
|
Read and write. |
|
Start writing at the end. |
|
Create file if it does not exist. |
|
Truncate file if it exists. |
|
Open only if it does not exist. |
|
EOL translation. |
|
Raw mode. |
|
Close a file, device or socket. The calling thread may be suspended until all buffered output data has been written.
|
|
Return the length of a file.
|
|
Perform device specific control functions. Check the specific device driver for a list of supported control functions.
|
|
Open a file.
|
|
Read data from a file, device or socket.
|
|
Move read/write position of a file.
|
|
Return the read/write position of a stream.
|
|
Write data to a file, device or socket.
|
|
Writes data from program space to a file, device or socket. Similar to _write() except that the data is located in program memory.
|