|
RT-Thread RTOS
1.0.0
An open source embedded real-time operating system
|
Functions | |
| int | open (const char *file, int flags, int mode) |
| int | close (int fd) |
| int | read (int fd, void *buf, size_t len) |
| int | write (int fd, const void *buf, size_t len) |
| off_t | lseek (int fd, off_t offset, int whence) |
| int | rename (const char *old, const char *new) |
| int | unlink (const char *pathname) |
| int | stat (const char *file, struct stat *buf) |
| int | fstat (int fildes, struct stat *buf) |
| int | statfs (const char *path, struct statfs *buf) |
| int | mkdir (const char *path, mode_t mode) |
| int | rmdir (const char *pathname) |
| DIR * | opendir (const char *name) |
| struct dirent * | readdir (DIR *d) |
| long | telldir (DIR *d) |
| void | seekdir (DIR *d, off_t offset) |
| void | rewinddir (DIR *d) |
| int | closedir (DIR *d) |
| char * | getcwd (char *buf, size_t size) |
| int open | ( | const char * | file, |
| int | flags, | ||
| int | mode | ||
| ) |
this function is a POSIX compliant version, which will open a file and return a file descriptor.
| file | the path name of file. |
| flags | the file open flags. |
| mode |
| int close | ( | int | fd | ) |
this function is a POSIX compliant version, which will close the open file descriptor.
| fd | the file descriptor. |
| int read | ( | int | fd, |
| void * | buf, | ||
| size_t | len | ||
| ) |
this function is a POSIX compliant version, which will read specified data buffer length for an open file descriptor.
| fd | the file descriptor. |
| buf | the buffer to save the read data. |
| len | the maximal length of data buffer |
| int write | ( | int | fd, |
| const void * | buf, | ||
| size_t | len | ||
| ) |
this function is a POSIX compliant version, which will write specified data buffer length for an open file descriptor.
| fd | the file descriptor |
| buf | the data buffer to be written. |
| len | the data buffer length. |
| off_t lseek | ( | int | fd, |
| off_t | offset, | ||
| int | whence | ||
| ) |
this function is a POSIX compliant version, which will seek the offset for an open file descriptor.
| fd | the file descriptor. |
| offset | the offset to be seeked. |
| whence | the directory of seek. |
| int rename | ( | const char * | old, |
| const char * | new | ||
| ) |
this function is a POSIX compliant version, which will rename old file name to new file name.
| old | the old file name. |
| new | the new file name. |
note: the old and new file name must be belong to a same file system.
| int unlink | ( | const char * | pathname | ) |
this function is a POSIX compliant version, which will unlink (remove) a specified path file from file system.
| pathname | the specified path name to be unlinked. |
this function is a POSIX compliant version, which will get file information.
| file | the file name |
| buf | the data buffer to save stat description. |
this function is a POSIX compliant version, which will get file status.
| fildes | the file description |
| buf | the data buffer to save stat description. |
this function is a POSIX compliant version, which will return the information about a mounted file system.
| path | the path which mounted file system. |
| buf | the buffer to save the returned information. |
| int mkdir | ( | const char * | path, |
| mode_t | mode | ||
| ) |
this function is a POSIX compliant version, which will make a directory
| path | the directory path to be made. |
| mode |
| int rmdir | ( | const char * | pathname | ) |
this function is a POSIX compliant version, which will remove a directory.
| pathname | the path name to be removed. |
| DIR* opendir | ( | const char * | name | ) |
this function is a POSIX compliant version, which will open a directory.
| name | the path name to be open. |
| struct dirent* readdir | ( | DIR * | d | ) | [read] |
this function is a POSIX compliant version, which will return a pointer to a dirent structure representing the next directory entry in the directory stream.
| d | the directory stream pointer. |
| long telldir | ( | DIR * | d | ) |
this function is a POSIX compliant version, which will return current location in directory stream.
| d | the directory stream pointer. |
| void seekdir | ( | DIR * | d, |
| off_t | offset | ||
| ) |
this function is a POSIX compliant version, which will set position of next directory structure in the directory stream.
| d | the directory stream. |
| offset | the offset in directory stream. |
| void rewinddir | ( | DIR * | d | ) |
this function is a POSIX compliant version, which will reset directory stream.
| d | the directory stream. |
| int closedir | ( | DIR * | d | ) |
this function is a POSIX compliant version, which will close a directory stream.
| d | the directory stream. |
| char* getcwd | ( | char * | buf, |
| size_t | size | ||
| ) |
this function is a POSIX compliant version, which will return current working directory.
| buf | the returned current directory. |
| size | the buffer size. |