GME  13
svn_io.h
Go to the documentation of this file.
00001 
00027 /* ==================================================================== */
00028 
00029 
00030 #ifndef SVN_IO_H
00031 #define SVN_IO_H
00032 
00033 #include <apr.h>
00034 #include <apr_pools.h>
00035 #include <apr_time.h>
00036 #include <apr_hash.h>
00037 #include <apr_tables.h>
00038 #include <apr_file_io.h>
00039 #include <apr_file_info.h>
00040 #include <apr_thread_proc.h>  /* for apr_proc_t, apr_exit_why_e */
00041 
00042 #include "svn_types.h"
00043 #include "svn_string.h"
00044 #include "svn_checksum.h"
00045 
00046 #ifdef __cplusplus
00047 extern "C" {
00048 #endif /* __cplusplus */
00049 
00050 
00051 
00058 typedef enum svn_io_file_del_t
00059 {
00061   svn_io_file_del_none = 0,
00063   svn_io_file_del_on_close,
00065   svn_io_file_del_on_pool_cleanup
00066 } svn_io_file_del_t;
00067 
00078 typedef struct svn_io_dirent2_t {
00079   /* New fields must be added at the end to preserve binary compatibility */
00080 
00082   svn_node_kind_t kind;
00083 
00089   svn_boolean_t special;
00090 
00092   svn_filesize_t filesize;
00093 
00095   apr_time_t mtime;
00096 
00097   /* Don't forget to update svn_io_dirent2_dup() when adding new fields */
00098 } svn_io_dirent2_t;
00099 
00100 
00105 svn_io_dirent2_t *
00106 svn_io_dirent2_create(apr_pool_t *result_pool);
00107 
00112 svn_io_dirent2_t *
00113 svn_io_dirent2_dup(const svn_io_dirent2_t *item,
00114                    apr_pool_t *result_pool);
00115 
00123 typedef struct svn_io_dirent_t {
00125   svn_node_kind_t kind;
00131   svn_boolean_t special;
00132 } svn_io_dirent_t;
00133 
00153 svn_error_t *
00154 svn_io_check_path(const char *path,
00155                   svn_node_kind_t *kind,
00156                   apr_pool_t *pool);
00157 
00164 svn_error_t *
00165 svn_io_check_special_path(const char *path,
00166                           svn_node_kind_t *kind,
00167                           svn_boolean_t *is_special,
00168                           apr_pool_t *pool);
00169 
00172 svn_error_t *
00173 svn_io_check_resolved_path(const char *path,
00174                            svn_node_kind_t *kind,
00175                            apr_pool_t *pool);
00176 
00177 
00229 svn_error_t *
00230 svn_io_open_uniquely_named(apr_file_t **file,
00231                            const char **unique_name,
00232                            const char *dirpath,
00233                            const char *filename,
00234                            const char *suffix,
00235                            svn_io_file_del_t delete_when,
00236                            apr_pool_t *result_pool,
00237                            apr_pool_t *scratch_pool);
00238 
00239 
00265 svn_error_t *
00266 svn_io_open_unique_file3(apr_file_t **file,
00267                          const char **temp_path,
00268                          const char *dirpath,
00269                          svn_io_file_del_t delete_when,
00270                          apr_pool_t *result_pool,
00271                          apr_pool_t *scratch_pool);
00272 
00273 
00281 SVN_DEPRECATED
00282 svn_error_t *
00283 svn_io_open_unique_file2(apr_file_t **f,
00284                          const char **unique_name_p,
00285                          const char *path,
00286                          const char *suffix,
00287                          svn_io_file_del_t delete_when,
00288                          apr_pool_t *pool);
00289 
00298 SVN_DEPRECATED
00299 svn_error_t *
00300 svn_io_open_unique_file(apr_file_t **f,
00301                         const char **unique_name_p,
00302                         const char *path,
00303                         const char *suffix,
00304                         svn_boolean_t delete_on_close,
00305                         apr_pool_t *pool);
00306 
00307 
00314 svn_error_t *
00315 svn_io_create_unique_link(const char **unique_name_p,
00316                           const char *path,
00317                           const char *dest,
00318                           const char *suffix,
00319                           apr_pool_t *pool);
00320 
00321 
00328 svn_error_t *
00329 svn_io_read_link(svn_string_t **dest,
00330                  const char *path,
00331                  apr_pool_t *pool);
00332 
00333 
00337 svn_error_t *
00338 svn_io_temp_dir(const char **dir,
00339                 apr_pool_t *pool);
00340 
00341 
00347 svn_error_t *
00348 svn_io_copy_file(const char *src,
00349                  const char *dst,
00350                  svn_boolean_t copy_perms,
00351                  apr_pool_t *pool);
00352 
00353 
00359 svn_error_t *
00360 svn_io_copy_perms(const char *src,
00361                   const char *dst,
00362                   apr_pool_t *pool);
00363 
00364 
00373 svn_error_t *
00374 svn_io_copy_link(const char *src,
00375                  const char *dst,
00376                  apr_pool_t *pool);
00377 
00378 
00389 svn_error_t *
00390 svn_io_copy_dir_recursively(const char *src,
00391                             const char *dst_parent,
00392                             const char *dst_basename,
00393                             svn_boolean_t copy_perms,
00394                             svn_cancel_func_t cancel_func,
00395                             void *cancel_baton,
00396                             apr_pool_t *pool);
00397 
00398 
00406 svn_error_t *
00407 svn_io_make_dir_recursively(const char *path,
00408                             apr_pool_t *pool);
00409 
00410 
00415 svn_error_t *
00416 svn_io_dir_empty(svn_boolean_t *is_empty_p,
00417                  const char *path,
00418                  apr_pool_t *pool);
00419 
00420 
00424 svn_error_t *
00425 svn_io_append_file(const char *src,
00426                    const char *dst,
00427                    apr_pool_t *pool);
00428 
00429 
00442 svn_error_t *
00443 svn_io_set_file_read_only(const char *path,
00444                           svn_boolean_t ignore_enoent,
00445                           apr_pool_t *pool);
00446 
00447 
00463 svn_error_t *
00464 svn_io_set_file_read_write(const char *path,
00465                            svn_boolean_t ignore_enoent,
00466                            apr_pool_t *pool);
00467 
00468 
00491 SVN_DEPRECATED
00492 svn_error_t *
00493 svn_io_set_file_read_write_carefully(const char *path,
00494                                      svn_boolean_t enable_write,
00495                                      svn_boolean_t ignore_enoent,
00496                                      apr_pool_t *pool);
00497 
00523 svn_error_t *
00524 svn_io_set_file_executable(const char *path,
00525                            svn_boolean_t executable,
00526                            svn_boolean_t ignore_enoent,
00527                            apr_pool_t *pool);
00528 
00535 svn_error_t *
00536 svn_io_is_file_executable(svn_boolean_t *executable,
00537                           const char *path,
00538                           apr_pool_t *pool);
00539 
00540 
00549 svn_error_t *
00550 svn_io_read_length_line(apr_file_t *file,
00551                         char *buf,
00552                         apr_size_t *limit,
00553                         apr_pool_t *pool);
00554 
00555 
00562 svn_error_t *
00563 svn_io_file_affected_time(apr_time_t *apr_time,
00564                           const char *path,
00565                           apr_pool_t *pool);
00566 
00573 svn_error_t *
00574 svn_io_set_file_affected_time(apr_time_t apr_time,
00575                               const char *path,
00576                               apr_pool_t *pool);
00577 
00592 void
00593 svn_io_sleep_for_timestamps(const char *path, apr_pool_t *pool);
00594 
00604 svn_error_t *
00605 svn_io_filesizes_different_p(svn_boolean_t *different_p,
00606                              const char *file1,
00607                              const char *file2,
00608                              apr_pool_t *pool);
00609 
00623 svn_error_t *
00624 svn_io_filesizes_three_different_p(svn_boolean_t *different_p12,
00625                                    svn_boolean_t *different_p23,
00626                                    svn_boolean_t *different_p13,
00627                                    const char *file1,
00628                                    const char *file2,
00629                                    const char *file3,
00630                                    apr_pool_t *scratch_pool);
00631 
00637 svn_error_t *
00638 svn_io_file_checksum2(svn_checksum_t **checksum,
00639                       const char *file,
00640                       svn_checksum_kind_t kind,
00641                       apr_pool_t *pool);
00642 
00643 
00650 SVN_DEPRECATED
00651 svn_error_t *
00652 svn_io_file_checksum(unsigned char digest[],
00653                      const char *file,
00654                      apr_pool_t *pool);
00655 
00656 
00660 svn_error_t *
00661 svn_io_files_contents_same_p(svn_boolean_t *same,
00662                              const char *file1,
00663                              const char *file2,
00664                              apr_pool_t *pool);
00665 
00674 svn_error_t *
00675 svn_io_files_contents_three_same_p(svn_boolean_t *same12,
00676                                    svn_boolean_t *same23,
00677                                    svn_boolean_t *same13,
00678                                    const char *file1,
00679                                    const char *file2,
00680                                    const char *file3,
00681                                    apr_pool_t *scratch_pool);
00682 
00687 svn_error_t *
00688 svn_io_file_create(const char *file,
00689                    const char *contents,
00690                    apr_pool_t *pool);
00691 
00700 SVN_DEPRECATED
00701 svn_error_t *
00702 svn_io_file_lock(const char *lock_file,
00703                  svn_boolean_t exclusive,
00704                  apr_pool_t *pool);
00705 
00718 svn_error_t *
00719 svn_io_file_lock2(const char *lock_file,
00720                   svn_boolean_t exclusive,
00721                   svn_boolean_t nonblocking,
00722                   apr_pool_t *pool);
00723 
00738 svn_error_t *
00739 svn_io_lock_open_file(apr_file_t *lockfile_handle,
00740                       svn_boolean_t exclusive,
00741                       svn_boolean_t nonblocking,
00742                       apr_pool_t *pool);
00743 
00752 svn_error_t *
00753 svn_io_unlock_open_file(apr_file_t *lockfile_handle,
00754                         apr_pool_t *pool);
00755 
00762 svn_error_t *
00763 svn_io_file_flush_to_disk(apr_file_t *file,
00764                           apr_pool_t *pool);
00765 
00774 svn_error_t *
00775 svn_io_dir_file_copy(const char *src_path,
00776                      const char *dest_path,
00777                      const char *file,
00778                      apr_pool_t *pool);
00779 
00780 
00814 typedef struct svn_stream_t svn_stream_t;
00815 
00816 
00817 
00819 typedef svn_error_t *(*svn_read_fn_t)(void *baton,
00820                                       char *buffer,
00821                                       apr_size_t *len);
00822 
00827 typedef svn_error_t *(*svn_stream_skip_fn_t)(void *baton,
00828                                              apr_size_t len);
00829 
00831 typedef svn_error_t *(*svn_write_fn_t)(void *baton,
00832                                        const char *data,
00833                                        apr_size_t *len);
00834 
00836 typedef svn_error_t *(*svn_close_fn_t)(void *baton);
00837 
00845 typedef struct svn_stream_mark_t svn_stream_mark_t;
00846 
00852 typedef svn_error_t *(*svn_stream_mark_fn_t)(void *baton,
00853                                          svn_stream_mark_t **mark,
00854                                          apr_pool_t *pool);
00855 
00861 typedef svn_error_t *(*svn_stream_seek_fn_t)(void *baton,
00862                                          const svn_stream_mark_t *mark);
00863 
00865 svn_stream_t *
00866 svn_stream_create(void *baton,
00867                   apr_pool_t *pool);
00868 
00870 void
00871 svn_stream_set_baton(svn_stream_t *stream,
00872                      void *baton);
00873 
00875 void
00876 svn_stream_set_read(svn_stream_t *stream,
00877                     svn_read_fn_t read_fn);
00878 
00883 void
00884 svn_stream_set_skip(svn_stream_t *stream,
00885                     svn_stream_skip_fn_t skip_fn);
00886 
00888 void
00889 svn_stream_set_write(svn_stream_t *stream,
00890                      svn_write_fn_t write_fn);
00891 
00893 void
00894 svn_stream_set_close(svn_stream_t *stream,
00895                      svn_close_fn_t close_fn);
00896 
00901 void
00902 svn_stream_set_mark(svn_stream_t *stream,
00903                     svn_stream_mark_fn_t mark_fn);
00904 
00909 void
00910 svn_stream_set_seek(svn_stream_t *stream,
00911                     svn_stream_seek_fn_t seek_fn);
00912 
00914 svn_stream_t *
00915 svn_stream_empty(apr_pool_t *pool);
00916 
00924 svn_stream_t *
00925 svn_stream_disown(svn_stream_t *stream,
00926                   apr_pool_t *pool);
00927 
00928 
00939 svn_error_t *
00940 svn_stream_open_readonly(svn_stream_t **stream,
00941                          const char *path,
00942                          apr_pool_t *result_pool,
00943                          apr_pool_t *scratch_pool);
00944 
00945 
00958 svn_error_t *
00959 svn_stream_open_writable(svn_stream_t **stream,
00960                          const char *path,
00961                          apr_pool_t *result_pool,
00962                          apr_pool_t *scratch_pool);
00963 
00964 
00982 svn_error_t *
00983 svn_stream_open_unique(svn_stream_t **stream,
00984                        const char **temp_path,
00985                        const char *dirpath,
00986                        svn_io_file_del_t delete_when,
00987                        apr_pool_t *result_pool,
00988                        apr_pool_t *scratch_pool);
00989 
00990 
01002 svn_stream_t *
01003 svn_stream_from_aprfile2(apr_file_t *file,
01004                          svn_boolean_t disown,
01005                          apr_pool_t *pool);
01006 
01016 SVN_DEPRECATED
01017 svn_stream_t *
01018 svn_stream_from_aprfile(apr_file_t *file,
01019                         apr_pool_t *pool);
01020 
01027 svn_error_t *
01028 svn_stream_for_stdin(svn_stream_t **in,
01029                      apr_pool_t *pool);
01030 
01037 svn_error_t *
01038 svn_stream_for_stderr(svn_stream_t **err,
01039                       apr_pool_t *pool);
01040 
01045 svn_error_t *
01046 svn_stream_for_stdout(svn_stream_t **out,
01047                       apr_pool_t *pool);
01048 
01052 svn_stream_t *
01053 svn_stream_from_stringbuf(svn_stringbuf_t *str,
01054                           apr_pool_t *pool);
01055 
01059 svn_stream_t *
01060 svn_stream_from_string(const svn_string_t *str,
01061                        apr_pool_t *pool);
01062 
01070 svn_stream_t *
01071 svn_stream_buffered(apr_pool_t *result_pool);
01072 
01083 svn_stream_t *
01084 svn_stream_compressed(svn_stream_t *stream,
01085                       apr_pool_t *pool);
01086 
01108 svn_stream_t *
01109 svn_stream_checksummed2(svn_stream_t *stream,
01110                         svn_checksum_t **read_checksum,
01111                         svn_checksum_t **write_checksum,
01112                         svn_checksum_kind_t checksum_kind,
01113                         svn_boolean_t read_all,
01114                         apr_pool_t *pool);
01115 
01123 SVN_DEPRECATED
01124 svn_stream_t *
01125 svn_stream_checksummed(svn_stream_t *stream,
01126                        const unsigned char **read_digest,
01127                        const unsigned char **write_digest,
01128                        svn_boolean_t read_all,
01129                        apr_pool_t *pool);
01130 
01132 svn_error_t *
01133 svn_stream_read(svn_stream_t *stream,
01134                 char *buffer,
01135                 apr_size_t *len);
01136 
01149 svn_error_t *
01150 svn_stream_skip(svn_stream_t *stream,
01151                 apr_size_t len);
01152 
01154 svn_error_t *
01155 svn_stream_write(svn_stream_t *stream,
01156                  const char *data,
01157                  apr_size_t *len);
01158 
01160 svn_error_t *
01161 svn_stream_close(svn_stream_t *stream);
01162 
01170 svn_error_t *
01171 svn_stream_reset(svn_stream_t *stream);
01172 
01178 svn_boolean_t
01179 svn_stream_supports_mark(svn_stream_t *stream);
01180 
01191 svn_error_t *
01192 svn_stream_mark(svn_stream_t *stream,
01193                 svn_stream_mark_t **mark,
01194                 apr_pool_t *pool);
01195 
01204 svn_error_t *
01205 svn_stream_seek(svn_stream_t *stream, const svn_stream_mark_t *mark);
01206 
01215 svn_stream_t *
01216 svn_stream_tee(svn_stream_t *out1,
01217                svn_stream_t *out2,
01218                apr_pool_t *pool);
01219 
01225 svn_error_t *
01226 svn_stream_puts(svn_stream_t *stream,
01227                 const char *str);
01228 
01232 svn_error_t *
01233 svn_stream_printf(svn_stream_t *stream,
01234                   apr_pool_t *pool,
01235                   const char *fmt,
01236                   ...)
01237        __attribute__((format(printf, 3, 4)));
01238 
01248 svn_error_t *
01249 svn_stream_printf_from_utf8(svn_stream_t *stream,
01250                             const char *encoding,
01251                             apr_pool_t *pool,
01252                             const char *fmt,
01253                             ...)
01254        __attribute__((format(printf, 4, 5)));
01255 
01264 svn_error_t *
01265 svn_stream_readline(svn_stream_t *stream,
01266                     svn_stringbuf_t **stringbuf,
01267                     const char *eol,
01268                     svn_boolean_t *eof,
01269                     apr_pool_t *pool);
01270 
01285 svn_error_t *
01286 svn_stream_copy3(svn_stream_t *from,
01287                  svn_stream_t *to,
01288                  svn_cancel_func_t cancel_func,
01289                  void *cancel_baton,
01290                  apr_pool_t *pool);
01291 
01298 SVN_DEPRECATED
01299 svn_error_t *
01300 svn_stream_copy2(svn_stream_t *from,
01301                  svn_stream_t *to,
01302                  svn_cancel_func_t cancel_func,
01303                  void *cancel_baton,
01304                  apr_pool_t *pool);
01305 
01313 SVN_DEPRECATED
01314 svn_error_t *
01315 svn_stream_copy(svn_stream_t *from,
01316                 svn_stream_t *to,
01317                 apr_pool_t *pool);
01318 
01319 
01330 svn_error_t *
01331 svn_stream_contents_same2(svn_boolean_t *same,
01332                           svn_stream_t *stream1,
01333                           svn_stream_t *stream2,
01334                           apr_pool_t *pool);
01335 
01336 
01343 SVN_DEPRECATED
01344 svn_error_t *
01345 svn_stream_contents_same(svn_boolean_t *same,
01346                          svn_stream_t *stream1,
01347                          svn_stream_t *stream2,
01348                          apr_pool_t *pool);
01349 
01350 
01363 svn_error_t *
01364 svn_string_from_stream(svn_string_t **result,
01365                        svn_stream_t *stream,
01366                        apr_pool_t *result_pool,
01367                        apr_pool_t *scratch_pool);
01368 
01369 
01384 typedef svn_error_t *
01385 (*svn_stream_lazyopen_func_t)(svn_stream_t **stream,
01386                               void *baton,
01387                               apr_pool_t *result_pool,
01388                               apr_pool_t *scratch_pool);
01389 
01390 
01405 svn_stream_t *
01406 svn_stream_lazyopen_create(svn_stream_lazyopen_func_t open_func,
01407                            void *open_baton,
01408                            svn_boolean_t open_on_close,
01409                            apr_pool_t *result_pool);
01410 
01428 svn_error_t *
01429 svn_stringbuf_from_file2(svn_stringbuf_t **result,
01430                          const char *filename,
01431                          apr_pool_t *pool);
01432 
01439 SVN_DEPRECATED
01440 svn_error_t *
01441 svn_stringbuf_from_file(svn_stringbuf_t **result,
01442                         const char *filename,
01443                         apr_pool_t *pool);
01444 
01452 svn_error_t *
01453 svn_stringbuf_from_aprfile(svn_stringbuf_t **result,
01454                            apr_file_t *file,
01455                            apr_pool_t *pool);
01456 
01467 svn_error_t *
01468 svn_io_remove_file2(const char *path,
01469                     svn_boolean_t ignore_enoent,
01470                     apr_pool_t *scratch_pool);
01471 
01476 SVN_DEPRECATED
01477 svn_error_t *
01478 svn_io_remove_file(const char *path,
01479                    apr_pool_t *pool);
01480 
01490 svn_error_t *
01491 svn_io_remove_dir2(const char *path,
01492                    svn_boolean_t ignore_enoent,
01493                    svn_cancel_func_t cancel_func,
01494                    void *cancel_baton,
01495                    apr_pool_t *pool);
01496 
01502 SVN_DEPRECATED
01503 svn_error_t *
01504 svn_io_remove_dir(const char *path,
01505                   apr_pool_t *pool);
01506 
01517 SVN_DEPRECATED
01518 svn_error_t *
01519 svn_io_get_dir_filenames(apr_hash_t **dirents,
01520                          const char *path,
01521                          apr_pool_t *pool);
01522 
01538 svn_error_t *
01539 svn_io_get_dirents3(apr_hash_t **dirents,
01540                     const char *path,
01541                     svn_boolean_t only_check_type,
01542                     apr_pool_t *result_pool,
01543                     apr_pool_t *scratch_pool);
01544 
01545 
01552 SVN_DEPRECATED
01553 svn_error_t *
01554 svn_io_get_dirents2(apr_hash_t **dirents,
01555                     const char *path,
01556                     apr_pool_t *pool);
01557 
01563 SVN_DEPRECATED
01564 svn_error_t *
01565 svn_io_get_dirents(apr_hash_t **dirents,
01566                    const char *path,
01567                    apr_pool_t *pool);
01568 
01583 svn_error_t *
01584 svn_io_stat_dirent2(const svn_io_dirent2_t **dirent_p,
01585                     const char *path,
01586                     svn_boolean_t verify_truename,
01587                     svn_boolean_t ignore_enoent,
01588                     apr_pool_t *result_pool,
01589                     apr_pool_t *scratch_pool);
01590 
01591 
01598 SVN_DEPRECATED
01599 svn_error_t *
01600 svn_io_stat_dirent(const svn_io_dirent2_t **dirent_p,
01601                    const char *path,
01602                    svn_boolean_t ignore_enoent,
01603                    apr_pool_t *result_pool,
01604                    apr_pool_t *scratch_pool);
01605 
01606 
01608 typedef svn_error_t * (*svn_io_walk_func_t)(void *baton,
01609                                             const char *path,
01610                                             const apr_finfo_t *finfo,
01611                                             apr_pool_t *pool);
01612 
01633 svn_error_t *
01634 svn_io_dir_walk2(const char *dirname,
01635                  apr_int32_t wanted,
01636                  svn_io_walk_func_t walk_func,
01637                  void *walk_baton,
01638                  apr_pool_t *pool);
01639 
01645 SVN_DEPRECATED
01646 svn_error_t *
01647 svn_io_dir_walk(const char *dirname,
01648                 apr_int32_t wanted,
01649                 svn_io_walk_func_t walk_func,
01650                 void *walk_baton,
01651                 apr_pool_t *pool);
01652 
01689 svn_error_t *svn_io_start_cmd3(apr_proc_t *cmd_proc,
01690                                const char *path,
01691                                const char *cmd,
01692                                const char *const *args,
01693                                const char *const *env,
01694                                svn_boolean_t inherit,
01695                                svn_boolean_t infile_pipe,
01696                                apr_file_t *infile,
01697                                svn_boolean_t outfile_pipe,
01698                                apr_file_t *outfile,
01699                                svn_boolean_t errfile_pipe,
01700                                apr_file_t *errfile,
01701                                apr_pool_t *pool);
01702 
01703 
01710 SVN_DEPRECATED
01711 svn_error_t *svn_io_start_cmd2(apr_proc_t *cmd_proc,
01712                                const char *path,
01713                                const char *cmd,
01714                                const char *const *args,
01715                                svn_boolean_t inherit,
01716                                svn_boolean_t infile_pipe,
01717                                apr_file_t *infile,
01718                                svn_boolean_t outfile_pipe,
01719                                apr_file_t *outfile,
01720                                svn_boolean_t errfile_pipe,
01721                                apr_file_t *errfile,
01722                                apr_pool_t *pool);
01723 
01731 SVN_DEPRECATED
01732 svn_error_t *
01733 svn_io_start_cmd(apr_proc_t *cmd_proc,
01734                  const char *path,
01735                  const char *cmd,
01736                  const char *const *args,
01737                  svn_boolean_t inherit,
01738                  apr_file_t *infile,
01739                  apr_file_t *outfile,
01740                  apr_file_t *errfile,
01741                  apr_pool_t *pool);
01742 
01759 svn_error_t *
01760 svn_io_wait_for_cmd(apr_proc_t *cmd_proc,
01761                     const char *cmd,
01762                     int *exitcode,
01763                     apr_exit_why_e *exitwhy,
01764                     apr_pool_t *pool);
01765 
01770 svn_error_t *
01771 svn_io_run_cmd(const char *path,
01772                const char *cmd,
01773                const char *const *args,
01774                int *exitcode,
01775                apr_exit_why_e *exitwhy,
01776                svn_boolean_t inherit,
01777                apr_file_t *infile,
01778                apr_file_t *outfile,
01779                apr_file_t *errfile,
01780                apr_pool_t *pool);
01781 
01802 svn_error_t *
01803 svn_io_run_diff2(const char *dir,
01804                  const char *const *user_args,
01805                  int num_user_args,
01806                  const char *label1,
01807                  const char *label2,
01808                  const char *from,
01809                  const char *to,
01810                  int *exitcode,
01811                  apr_file_t *outfile,
01812                  apr_file_t *errfile,
01813                  const char *diff_cmd,
01814                  apr_pool_t *pool);
01815 
01820 SVN_DEPRECATED
01821 svn_error_t *
01822 svn_io_run_diff(const char *dir,
01823                 const char *const *user_args,
01824                 int num_user_args,
01825                 const char *label1,
01826                 const char *label2,
01827                 const char *from,
01828                 const char *to,
01829                 int *exitcode,
01830                 apr_file_t *outfile,
01831                 apr_file_t *errfile,
01832                 const char *diff_cmd,
01833                 apr_pool_t *pool);
01834 
01835 
01836 
01871 svn_error_t *
01872 svn_io_run_diff3_3(int *exitcode,
01873                    const char *dir,
01874                    const char *mine,
01875                    const char *older,
01876                    const char *yours,
01877                    const char *mine_label,
01878                    const char *older_label,
01879                    const char *yours_label,
01880                    apr_file_t *merged,
01881                    const char *diff3_cmd,
01882                    const apr_array_header_t *user_args,
01883                    apr_pool_t *pool);
01884 
01891 SVN_DEPRECATED
01892 svn_error_t *
01893 svn_io_run_diff3_2(int *exitcode,
01894                    const char *dir,
01895                    const char *mine,
01896                    const char *older,
01897                    const char *yours,
01898                    const char *mine_label,
01899                    const char *older_label,
01900                    const char *yours_label,
01901                    apr_file_t *merged,
01902                    const char *diff3_cmd,
01903                    const apr_array_header_t *user_args,
01904                    apr_pool_t *pool);
01905 
01910 SVN_DEPRECATED
01911 svn_error_t *
01912 svn_io_run_diff3(const char *dir,
01913                  const char *mine,
01914                  const char *older,
01915                  const char *yours,
01916                  const char *mine_label,
01917                  const char *older_label,
01918                  const char *yours_label,
01919                  apr_file_t *merged,
01920                  int *exitcode,
01921                  const char *diff3_cmd,
01922                  apr_pool_t *pool);
01923 
01924 
01932 svn_error_t *
01933 svn_io_parse_mimetypes_file(apr_hash_t **type_map,
01934                             const char *mimetypes_file,
01935                             apr_pool_t *pool);
01936 
01937 
01951 svn_error_t *
01952 svn_io_detect_mimetype2(const char **mimetype,
01953                         const char *file,
01954                         apr_hash_t *mimetype_map,
01955                         apr_pool_t *pool);
01956 
01957 
01963 SVN_DEPRECATED
01964 svn_error_t *
01965 svn_io_detect_mimetype(const char **mimetype,
01966                        const char *file,
01967                        apr_pool_t *pool);
01968 
01969 
01976 svn_boolean_t
01977 svn_io_is_binary_data(const void *buf, apr_size_t len);
01978 
01979 
01982 svn_error_t *
01983 svn_io_file_open(apr_file_t **new_file,
01984                  const char *fname,
01985                  apr_int32_t flag,
01986                  apr_fileperms_t perm,
01987                  apr_pool_t *pool);
01988 
01989 
01991 svn_error_t *
01992 svn_io_file_close(apr_file_t *file,
01993                   apr_pool_t *pool);
01994 
01995 
01997 svn_error_t *
01998 svn_io_file_getc(char *ch,
01999                  apr_file_t *file,
02000                  apr_pool_t *pool);
02001 
02002 
02006 svn_error_t *
02007 svn_io_file_putc(char ch,
02008                  apr_file_t *file,
02009                  apr_pool_t *pool);
02010 
02011 
02013 svn_error_t *
02014 svn_io_file_info_get(apr_finfo_t *finfo,
02015                      apr_int32_t wanted,
02016                      apr_file_t *file,
02017                      apr_pool_t *pool);
02018 
02019 
02021 svn_error_t *
02022 svn_io_file_read(apr_file_t *file,
02023                  void *buf,
02024                  apr_size_t *nbytes,
02025                  apr_pool_t *pool);
02026 
02027 
02035 svn_error_t *
02036 svn_io_file_read_full2(apr_file_t *file,
02037                        void *buf,
02038                        apr_size_t nbytes,
02039                        apr_size_t *bytes_read,
02040                        svn_boolean_t *hit_eof,
02041                        apr_pool_t *pool);
02042 
02043 
02049 SVN_DEPRECATED
02050 svn_error_t *
02051 svn_io_file_read_full(apr_file_t *file,
02052                       void *buf,
02053                       apr_size_t nbytes,
02054                       apr_size_t *bytes_read,
02055                       apr_pool_t *pool);
02056 
02057 
02059 svn_error_t *
02060 svn_io_file_seek(apr_file_t *file,
02061                  apr_seek_where_t where,
02062                  apr_off_t *offset,
02063                  apr_pool_t *pool);
02064 
02065 
02067 svn_error_t *
02068 svn_io_file_write(apr_file_t *file,
02069                   const void *buf,
02070                   apr_size_t *nbytes,
02071                   apr_pool_t *pool);
02072 
02073 
02075 svn_error_t *
02076 svn_io_file_write_full(apr_file_t *file,
02077                        const void *buf,
02078                        apr_size_t nbytes,
02079                        apr_size_t *bytes_written,
02080                        apr_pool_t *pool);
02081 
02096 svn_error_t *
02097 svn_io_write_unique(const char **tmp_path,
02098                     const char *dirpath,
02099                     const void *buf,
02100                     apr_size_t nbytes,
02101                     svn_io_file_del_t delete_when,
02102                     apr_pool_t *pool);
02103 
02106 svn_error_t *
02107 svn_io_file_trunc(apr_file_t *file,
02108                   apr_off_t offset,
02109                   apr_pool_t *pool);
02110 
02111 
02113 svn_error_t *
02114 svn_io_stat(apr_finfo_t *finfo,
02115             const char *fname,
02116             apr_int32_t wanted,
02117             apr_pool_t *pool);
02118 
02119 
02127 svn_error_t *
02128 svn_io_file_rename(const char *from_path,
02129                    const char *to_path,
02130                    apr_pool_t *pool);
02131 
02132 
02141 svn_error_t *
02142 svn_io_file_move(const char *from_path,
02143                  const char *to_path,
02144                  apr_pool_t *pool);
02145 
02146 
02148 svn_error_t *
02149 svn_io_dir_make(const char *path,
02150                 apr_fileperms_t perm,
02151                 apr_pool_t *pool);
02152 
02155 svn_error_t *
02156 svn_io_dir_make_hidden(const char *path,
02157                        apr_fileperms_t perm,
02158                        apr_pool_t *pool);
02159 
02170 svn_error_t *
02171 svn_io_dir_make_sgid(const char *path,
02172                      apr_fileperms_t perm,
02173                      apr_pool_t *pool);
02174 
02176 svn_error_t *
02177 svn_io_dir_open(apr_dir_t **new_dir,
02178                 const char *dirname,
02179                 apr_pool_t *pool);
02180 
02185 svn_error_t *
02186 svn_io_dir_close(apr_dir_t *thedir);
02187 
02192 svn_error_t *
02193 svn_io_dir_remove_nonrecursive(const char *dirname,
02194                                apr_pool_t *pool);
02195 
02196 
02202 svn_error_t *
02203 svn_io_dir_read(apr_finfo_t *finfo,
02204                 apr_int32_t wanted,
02205                 apr_dir_t *thedir,
02206                 apr_pool_t *pool);
02207 
02213 svn_error_t *
02214 svn_io_file_name_get(const char **filename,
02215                      apr_file_t *file,
02216                      apr_pool_t *pool);
02217 
02218 
02219 
02231 svn_error_t *
02232 svn_io_read_version_file(int *version,
02233                          const char *path,
02234                          apr_pool_t *pool);
02235 
02241 svn_error_t *
02242 svn_io_write_version_file(const char *path,
02243                           int version,
02244                           apr_pool_t *pool);
02245 
02267 svn_error_t *
02268 svn_io_file_readline(apr_file_t *file,
02269                      svn_stringbuf_t **stringbuf,
02270                      const char **eol,
02271                      svn_boolean_t *eof,
02272                      apr_size_t max_len,
02273                      apr_pool_t *result_pool,
02274                      apr_pool_t *scratch_pool);
02275 
02278 #ifdef __cplusplus
02279 }
02280 #endif /* __cplusplus */
02281 
02282 #endif /* SVN_IO_H */