|
RT-Thread RTOS
1.0.0
An open source embedded real-time operating system
|
Functions | |
| int | dfs_file_open (struct dfs_fd *fd, const char *path, int flags) |
| int | dfs_file_close (struct dfs_fd *fd) |
| int | dfs_file_ioctl (struct dfs_fd *fd, int cmd, void *args) |
| int | dfs_file_read (struct dfs_fd *fd, void *buf, rt_size_t len) |
| int | dfs_file_getdents (struct dfs_fd *fd, struct dirent *dirp, rt_size_t nbytes) |
| int | dfs_file_unlink (const char *path) |
| int | dfs_file_write (struct dfs_fd *fd, const void *buf, rt_size_t len) |
| int | dfs_file_flush (struct dfs_fd *fd) |
| int | dfs_file_lseek (struct dfs_fd *fd, rt_off_t offset) |
| int | dfs_file_stat (const char *path, struct stat *buf) |
| int | dfs_file_rename (const char *oldpath, const char *newpath) |
| int dfs_file_open | ( | struct dfs_fd * | fd, |
| const char * | path, | ||
| int | flags | ||
| ) |
this function will open a file which specified by path with specified flags.
| fd | the file descriptor pointer to return the corresponding result. |
| path | the specified file path. |
| flags | the flags for open operator. |
| int dfs_file_close | ( | struct dfs_fd * | fd | ) |
this function will close a file descriptor.
| fd | the file descriptor to be closed. |
| int dfs_file_ioctl | ( | struct dfs_fd * | fd, |
| int | cmd, | ||
| void * | args | ||
| ) |
this function will perform a io control on a file descriptor.
| fd | the file descriptor. |
| cmd | the command to send to file descriptor. |
| args | the argument to send to file descriptor. |
| int dfs_file_read | ( | struct dfs_fd * | fd, |
| void * | buf, | ||
| rt_size_t | len | ||
| ) |
this function will read specified length data from a file descriptor to a buffer.
| fd | the file descriptor. |
| buf | the buffer to save the read data. |
| len | the length of data buffer to be read. |
| int dfs_file_getdents | ( | struct dfs_fd * | fd, |
| struct dirent * | dirp, | ||
| rt_size_t | nbytes | ||
| ) |
this function will fetch directory entries from a directory descriptor.
| fd | the directory descriptor. |
| dirp | the dirent buffer to save result. |
| nbytes | the available room in the buffer. |
| int dfs_file_unlink | ( | const char * | path | ) |
this function will unlink (remove) a specified path file from file system.
| path | the specified path file to be unlinked. |
| int dfs_file_write | ( | struct dfs_fd * | fd, |
| const void * | buf, | ||
| rt_size_t | len | ||
| ) |
this function will write some specified length data to file system.
| fd | the file descriptor. |
| buf | the data buffer to be written. |
| len | the data buffer length |
| int dfs_file_flush | ( | struct dfs_fd * | fd | ) |
this function will flush buffer on a file descriptor.
| fd | the file descriptor. |
| int dfs_file_lseek | ( | struct dfs_fd * | fd, |
| rt_off_t | offset | ||
| ) |
this function will seek the offset for specified file descriptor.
| fd | the file descriptor. |
| offset | the offset to be seeked. |
| int dfs_file_stat | ( | const char * | path, |
| struct stat * | buf | ||
| ) |
this function will get file information.
| path | the file path. |
| buf | the data buffer to save stat description. |
| int dfs_file_rename | ( | const char * | oldpath, |
| const char * | newpath | ||
| ) |
this function will rename an old path name to a new path name.
| oldpath | the old path name. |
| newpath | the new path name. |