RT-Thread RTOS  1.0.0
An open source embedded real-time operating system
File Descriptor

Functions

int fd_new (void)
struct dfs_fd * fd_get (int fd)
void fd_put (struct dfs_fd *fd)
int fd_is_open (const char *pathname)

Function Documentation

int fd_new ( void  )

This function will allocate a file descriptor.

Returns:
-1 on failed or the allocated file descriptor.
struct dfs_fd* fd_get ( int  fd) [read]

This function will return a file descriptor structure according to file descriptor.

Returns:
NULL on on this file descriptor or the file descriptor structure pointer.
void fd_put ( struct dfs_fd *  fd)

This function will put the file descriptor.

int fd_is_open ( const char *  pathname)

This function will return whether this file has been opend.

Parameters:
pathnamethe file path name.
Returns:
0 on file has been open successfully, -1 on open failed.
 All Data Structures Variables