00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef FILE_IO_H
00018 #define FILE_IO_H
00019
00020 #include "apr_private.h"
00021 #include "apr_general.h"
00022 #include "apr_thread_mutex.h"
00023 #include "apr_file_io.h"
00024 #include "apr_file_info.h"
00025 #include "apr_errno.h"
00026 #include "apr_poll.h"
00027
00028
00029
00030
00031
00032 #undef HAVE_MKSTEMP
00033
00034 #define APR_FILE_BUFSIZE 4096
00035
00036 struct apr_file_t {
00037 apr_pool_t *pool;
00038 HFILE filedes;
00039 char * fname;
00040 int isopen;
00041 int buffered;
00042 int eof_hit;
00043 apr_int32_t flags;
00044 int timeout;
00045 int pipe;
00046 HEV pipeSem;
00047 enum { BLK_UNKNOWN, BLK_OFF, BLK_ON } blocking;
00048
00049
00050 char *buffer;
00051 int bufpos;
00052 unsigned long dataRead;
00053 int direction;
00054 unsigned long filePtr;
00055 apr_thread_mutex_t *mutex;
00056 };
00057
00058 struct apr_dir_t {
00059 apr_pool_t *pool;
00060 char *dirname;
00061 ULONG handle;
00062 FILEFINDBUF3 entry;
00063 int validentry;
00064 };
00065
00066 apr_status_t apr_file_cleanup(void *);
00067 apr_status_t apr_os2_time_to_apr_time(apr_time_t *result, FDATE os2date,
00068 FTIME os2time);
00069 apr_status_t apr_apr_time_to_os2_time(FDATE *os2date, FTIME *os2time,
00070 apr_time_t aprtime);
00071
00072
00073 extern const char c_is_fnchar[256];
00074
00075 #define IS_FNCHAR(c) c_is_fnchar[(unsigned char)c]
00076
00077 apr_status_t filepath_root_test(char *path, apr_pool_t *p);
00078 apr_status_t filepath_drive_get(char **rootpath, char drive,
00079 apr_int32_t flags, apr_pool_t *p);
00080 apr_status_t filepath_root_case(char **rootpath, char *root, apr_pool_t *p);
00081
00082 #endif
00083