You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rb...@hyperreal.org on 1999/02/22 14:01:50 UTC

cvs commit: apache-apr/include file_io.h

rbb         99/02/22 05:01:50

  Added:       include  file_io.h
  Log:
  This file is the include file for all file_io functions in apr.  It defines
  all file_io data types, and provides the prototypes for all the file_io
  functions.
  
  Revision  Changes    Path
  1.1                  apache-apr/include/file_io.h
  
  Index: file_io.h
  ===================================================================
  #include <sys/stat.h>
  #include <sys/types.h>
  #include <fcntl.h>
  #include <time.h>
  #include "apr_general.h"
  
  #ifndef _FILE_IO_
  #define _FILE_IO_
  
  /* Flags for apr_open */
  #define APR_READ     1           /* Open the file for reading */
  #define APR_WRITE    2           /* Open the file for writing */
  #define APR_CREATE   4           /* Create the file if not there */
  #define APR_APPEND   8           /* Append to the end of the file */
  #define APR_TRUNCATE 16          /* Open the file and truncate to 0 length */
  #define APR_BINARY   32          /* Open the file in binary mode */
  #define APR_BUFFERED 64          /* Buffer the data when reading or writing */
  #define APR_EXCL     128         /* Open should fail if APR_CREATE and file
  				    exists. */
  #define APR_NONBLOCK 256          /* Don't block when reading or writing */
  
  struct APRFile {
      int filedes;
      char * fname;
      int buffered;
      mode_t protection;
      uid_t user;
      gid_t group;
      off_t size;
      time_t atime;    
      time_t mtime;
      time_t ctime;
  }
  
  
  
  /*   Function definitions */
  APRFile *apr_open(char *fname, int flag, mode_t mode);