1 #include <bindings.dsl.h>
2 #include <apr_file_io.h>
4 module Bindings.APR.File.IO where
7 import Bindings.APR.ErrNo
8 import Bindings.APR.File.Info
9 import Bindings.APR.File.Types
10 import Bindings.APR.Pools
11 import Bindings.APR.Time
12 import Bindings.APR.Want
18 #num APR_FOPEN_TRUNCATE
21 #num APR_FOPEN_BUFFERED
22 #num APR_FOPEN_DELONCLOSE
23 #num APR_FOPEN_XTHREAD
24 #num APR_FOPEN_SHARELOCK
25 #num APR_FOPEN_NOCLEANUP
26 #num APR_FOPEN_SENDFILE_ENABLED
27 #num APR_FOPEN_LARGEFILE
41 #num APR_FILE_NOCLEANUP
42 #num APR_SENDFILE_ENABLED
49 #num APR_FILE_ATTR_READONLY
50 #num APR_FILE_ATTR_EXECUTABLE
51 #num APR_FILE_ATTR_HIDDEN
53 #num APR_MAX_IOVEC_SIZE
55 #integral_t apr_fileattrs_t
56 #integral_t apr_seek_where_t
59 #num APR_FLOCK_EXCLUSIVE
60 #num APR_FLOCK_TYPEMASK
61 #num APR_FLOCK_NONBLOCK
63 #ccall apr_file_open , Ptr (Ptr <apr_file_t>) -> Ptr CChar -> <apr_int32_t> -> <apr_fileperms_t> -> Ptr <apr_pool_t> -> IO <apr_status_t>
64 #ccall apr_file_close , Ptr <apr_file_t> -> IO <apr_status_t>
65 #ccall apr_file_remove, Ptr CChar -> Ptr <apr_pool_t> -> IO <apr_status_t>
66 #ccall apr_file_rename, Ptr CChar -> Ptr CChar -> Ptr <apr_pool_t> -> IO <apr_status_t>
67 #ccall apr_file_copy , Ptr CChar -> Ptr CChar -> <apr_fileperms_t> -> Ptr <apr_pool_t> -> IO <apr_status_t>
68 #ccall apr_file_append, Ptr CChar -> Ptr CChar -> <apr_fileperms_t> -> Ptr <apr_pool_t> -> IO <apr_status_t>
69 #ccall apr_file_eof , Ptr <apr_file_t> -> IO <apr_status_t>
71 #ccall apr_file_open_stderr, Ptr (Ptr <apr_file_t>) -> Ptr <apr_pool_t> -> IO <apr_status_t>
72 #ccall apr_file_open_stdout, Ptr (Ptr <apr_file_t>) -> Ptr <apr_pool_t> -> IO <apr_status_t>
73 #ccall apr_file_open_stdin , Ptr (Ptr <apr_file_t>) -> Ptr <apr_pool_t> -> IO <apr_status_t>
75 #ccall apr_file_open_flags_stderr, Ptr (Ptr <apr_file_t>) -> <apr_int32_t> -> Ptr <apr_pool_t> -> IO <apr_status_t>
76 #ccall apr_file_open_flags_stdout, Ptr (Ptr <apr_file_t>) -> <apr_int32_t> -> Ptr <apr_pool_t> -> IO <apr_status_t>
77 #ccall apr_file_open_flags_stdin , Ptr (Ptr <apr_file_t>) -> <apr_int32_t> -> Ptr <apr_pool_t> -> IO <apr_status_t>
79 #ccall apr_file_read , Ptr <apr_file_t> -> Ptr () -> Ptr <apr_size_t> -> IO <apr_status_t>
80 #ccall apr_file_write , Ptr <apr_file_t> -> Ptr () -> Ptr <apr_size_t> -> IO <apr_status_t>
81 #ccall apr_file_writev , Ptr <apr_file_t> -> Ptr <iovec> -> <apr_size_t> -> Ptr <apr_size_t> -> IO <apr_status_t>
82 #ccall apr_file_read_full , Ptr <apr_file_t> -> Ptr () -> <apr_size_t> -> Ptr <apr_size_t> -> IO <apr_status_t>
83 #ccall apr_file_write_full , Ptr <apr_file_t> -> Ptr () -> <apr_size_t> -> Ptr <apr_size_t> -> IO <apr_status_t>
84 #ccall apr_file_writev_full, Ptr <apr_file_t> -> Ptr <iovec> -> <apr_size_t> -> Ptr <apr_size_t> -> IO <apr_status_t>
86 #ccall apr_file_putc , CChar -> Ptr <apr_file_t> -> IO <apr_status_t>
87 #ccall apr_file_getc , CChar -> Ptr <apr_file_t> -> IO <apr_status_t>
88 #ccall apr_file_ungetc , CChar -> Ptr <apr_file_t> -> IO <apr_status_t>
89 #ccall apr_file_gets , Ptr CChar -> CInt -> Ptr <apr_file_t> -> IO <apr_status_t>
90 #ccall apr_file_puts , Ptr CChar -> Ptr <apr_file_t> -> IO <apr_status_t>
91 #ccall apr_file_flush , Ptr <apr_file_t> -> IO <apr_status_t>
92 #ccall apr_file_dup , Ptr (Ptr <apr_file_t>) -> Ptr <apr_file_t> -> Ptr <apr_pool_t> -> IO <apr_status_t>
93 #ccall apr_file_dup2 , Ptr <apr_file_t> -> Ptr <apr_file_t> -> Ptr <apr_pool_t> -> IO <apr_status_t>
94 #ccall apr_file_setaside, Ptr (Ptr <apr_file_t>) -> Ptr <apr_file_t> -> Ptr <apr_pool_t> -> IO <apr_status_t>
95 #ccall apr_file_buffer_set , Ptr <apr_file_t> -> Ptr CChar -> <apr_size_t> -> IO <apr_status_t>
96 #ccall apr_file_buffer_size_get , Ptr <apr_size_t> -> IO <apr_size_t>
97 #ccall apr_file_seek , Ptr <apr_file_t> -> <apr_seek_where_t> -> Ptr <apr_off_t> -> IO <apr_status_t>
98 #ccall apr_file_pipe_create , Ptr (Ptr <apr_file_t>) -> Ptr (Ptr <apr_file_t>) -> Ptr <apr_pool_t> -> IO <apr_status_t>
99 #ccall apr_file_pipe_create_ex , Ptr (Ptr <apr_file_t>) -> Ptr (Ptr <apr_file_t>) -> <apr_int32_t> -> Ptr <apr_pool_t> -> IO <apr_status_t>
100 #ccall apr_file_namedpipe_create, Ptr CChar -> <apr_fileperms_t> -> Ptr <apr_pool_t> -> IO <apr_status_t>
101 #ccall apr_file_pipe_timeout_get, Ptr <apr_file_t> -> Ptr <apr_interval_time_t> -> IO <apr_status_t>
102 #ccall apr_file_pipe_timeout_set, Ptr <apr_file_t> -> <apr_interval_time_t> -> IO <apr_status_t>
103 #ccall apr_file_lock , Ptr <apr_file_t> -> CInt -> IO <apr_status_t>
104 #ccall apr_file_unlock , Ptr <apr_file_t> -> IO <apr_status_t>
105 #ccall apr_file_name_get , Ptr (Ptr CChar) -> Ptr <apr_file_t> -> IO <apr_status_t>
106 #ccall apr_file_data_get , Ptr (Ptr ()) -> Ptr CChar -> Ptr <apr_file_t> -> IO <apr_status_t>
107 #ccall apr_file_data_set , Ptr <apr_file_t> -> Ptr () -> Ptr CChar -> FunPtr (Ptr () -> IO <apr_status_t>) -> IO <apr_status_t>
108 -- apr_file_printf can't be wrapped as it takes varargs.
109 #ccall apr_file_perms_set, Ptr CChar -> <apr_fileperms_t> -> IO <apr_status_t>
110 #ccall apr_file_attrs_set, Ptr CChar -> <apr_fileattrs_t> -> <apr_fileattrs_t> -> Ptr <apr_pool_t> -> IO <apr_status_t>
111 #ccall apr_file_mtime_set, Ptr CChar -> <apr_time_t> -> Ptr <apr_pool_t> -> IO <apr_status_t>
112 #ccall apr_dir_make , Ptr CChar -> <apr_fileperms_t> -> Ptr <apr_pool_t> -> IO <apr_status_t>
113 #ccall apr_dir_make_recursive, Ptr CChar -> <apr_fileperms_t> -> Ptr <apr_pool_t> -> IO <apr_status_t>
114 #ccall apr_dir_remove , Ptr CChar -> Ptr <apr_pool_t> -> IO <apr_status_t>
115 #ccall apr_file_info_get , Ptr <apr_finfo_t> -> <apr_int32_t> -> Ptr <apr_file_t> -> IO <apr_status_t>
116 #ccall apr_file_trunc , Ptr <apr_file_t> -> <apr_off_t> -> IO <apr_status_t>
117 #ccall apr_file_flags_get, Ptr <apr_file_t> -> IO <apr_int32_t>
119 #ccall apr_file_pool_get , Ptr <apr_file_t> -> IO (Ptr <apr_pool_t>)
120 #ccall apr_file_inherit_set , Ptr <apr_file_t> -> IO <apr_status_t>
121 #ccall apr_file_inherit_unset, Ptr <apr_file_t> -> IO <apr_status_t>