Function open

Synopsis:
     int fd = open(const char *path, int flags, mode_t mode);

Required header files:
      <sys/types.h>  <sys/stat.h>  <fcntl.h> 

This function opens the file specified by path according to the request specified by flags.


Function close

Synopsis:
     int rc = close(int fd);

Required header files:
      <unistd.h> 

This function closes the file specified by file descriptor fd.


Function read

Synopsis:
     ssize_t nbytes = read(int fd, void *buf, size_t n);

Required header files:
      <unistd.h> 

This function reads n bytes from the file specified by descriptor fd and copies them to the memory area addressed by buf.


Function write

Synopsis:
     ssize_t nbytes = write(int fd, const void *buf, size_t n);

Required header files:
      <unistd.h> 

This function writes n bytes to the file specified by descriptor fd copying them from the memory area addressed by buf.


Produced on Sat Apr 02 2005 at 12:30:05.624.