34 #include <apr_pools.h> 37 #include <apr_tables.h> 38 #include <apr_file_io.h> 39 #include <apr_file_info.h> 40 #include <apr_thread_proc.h> 114 apr_pool_t *result_pool);
232 const char **unique_name,
234 const char *filename,
236 svn_io_file_del_t delete_when,
237 apr_pool_t *result_pool,
238 apr_pool_t *scratch_pool);
269 const char **temp_path,
271 svn_io_file_del_t delete_when,
272 apr_pool_t *result_pool,
273 apr_pool_t *scratch_pool);
286 const char **unique_name_p,
289 svn_io_file_del_t delete_when,
303 const char **unique_name_p,
393 const char *dst_parent,
394 const char *dst_basename,
632 apr_pool_t *scratch_pool);
683 apr_pool_t *scratch_pool);
698 const char *contents,
716 const void *contents,
718 apr_pool_t *scratch_pool);
731 apr_pool_t *scratch_pool);
823 const char *dest_path,
918 typedef svn_error_t *(*svn_stream_data_available_fn_t)(
void *baton,
1043 apr_pool_t *result_pool,
1044 apr_pool_t *scratch_pool);
1062 apr_pool_t *result_pool,
1063 apr_pool_t *scratch_pool);
1086 const char **temp_path,
1087 const char *dirpath,
1088 svn_io_file_del_t delete_when,
1089 apr_pool_t *result_pool,
1090 apr_pool_t *scratch_pool);
1191 apr_size_t len_hint,
1192 apr_pool_t *result_pool);
1272 const unsigned char **read_digest,
1273 const unsigned char **write_digest,
1292 apr_pool_t *result_pool,
1293 apr_pool_t *scratch_pool);
1466 __attribute__((format(printf, 3, 4)));
1479 const
char *encoding,
1483 __attribute__((format(printf, 4, 5)));
1603 apr_size_t len_hint,
1604 apr_pool_t *result_pool);
1615 apr_pool_t *result_pool,
1616 apr_pool_t *scratch_pool);
1635 apr_pool_t *result_pool,
1636 apr_pool_t *scratch_pool);
1661 apr_pool_t *result_pool);
1682 const
char *filename,
1694 const
char *filename,
1722 apr_pool_t *scratch_pool);
1794 apr_pool_t *result_pool,
1795 apr_pool_t *scratch_pool);
1840 apr_pool_t *result_pool,
1841 apr_pool_t *scratch_pool);
1855 apr_pool_t *result_pool,
1856 apr_pool_t *scratch_pool);
1862 const apr_finfo_t *finfo,
1944 const
char *const *args,
1945 const
char *const *env,
1950 apr_file_t *outfile,
1952 apr_file_t *errfile,
1966 const
char *const *args,
1971 apr_file_t *outfile,
1973 apr_file_t *errfile,
1988 const
char *const *args,
1991 apr_file_t *outfile,
1992 apr_file_t *errfile,
2015 apr_exit_why_e *exitwhy,
2025 const
char *const *args,
2027 apr_exit_why_e *exitwhy,
2030 apr_file_t *outfile,
2031 apr_file_t *errfile,
2056 const
char *const *user_args,
2063 apr_file_t *outfile,
2064 apr_file_t *errfile,
2065 const
char *diff_cmd,
2075 const
char *const *user_args,
2082 apr_file_t *outfile,
2083 apr_file_t *errfile,
2084 const
char *diff_cmd,
2129 const
char *mine_label,
2130 const
char *older_label,
2131 const
char *yours_label,
2133 const
char *diff3_cmd,
2134 const apr_array_header_t *user_args,
2150 const
char *mine_label,
2151 const
char *older_label,
2152 const
char *yours_label,
2154 const
char *diff3_cmd,
2155 const apr_array_header_t *user_args,
2168 const
char *mine_label,
2169 const
char *older_label,
2170 const
char *yours_label,
2173 const
char *diff3_cmd,
2186 const
char *mimetypes_file,
2206 apr_hash_t *mimetype_map,
2238 apr_fileperms_t perm,
2313 apr_size_t *bytes_read,
2328 apr_size_t *bytes_read,
2335 apr_seek_where_t where,
2357 apr_off_t block_size,
2358 apr_off_t *buffer_start,
2360 apr_pool_t *scratch_pool);
2374 apr_pool_t *scratch_pool);
2383 apr_size_t *bytes_written,
2408 const
char *copy_perms_path,
2410 apr_pool_t *scratch_pool);
2424 const
char* copy_perms_path,
2425 apr_pool_t *scratch_pool);
2443 const
char *dirpath,
2446 svn_io_file_del_t delete_when,
2491 const
char *to_path,
2505 const
char *to_path,
2512 apr_fileperms_t perm,
2519 apr_fileperms_t perm,
2534 apr_fileperms_t perm,
2540 const
char *dirname,
2635 apr_pool_t *result_pool,
2636 apr_pool_t *scratch_pool);
svn_error_t *(* svn_stream_data_available_fn_t)(void *baton, svn_boolean_t *data_available)
Poll handler for generic streams that support incomplete reads,.
svn_error_t *(* svn_stream_seek_fn_t)(void *baton, const svn_stream_mark_t *mark)
Seek handler function for a generic stream.
Counted-length strings for Subversion, plus some C string goodies.
svn_error_t * svn_io_file_seek(apr_file_t *file, apr_seek_where_t where, apr_off_t *offset, apr_pool_t *pool)
Wrapper for apr_file_seek().
svn_error_t * svn_io_check_special_path(const char *path, svn_node_kind_t *kind, svn_boolean_t *is_special, apr_pool_t *pool)
Like svn_io_check_path(), but also set *is_special to TRUE if the path is not a normal file...
svn_error_t * svn_io_file_create_bytes(const char *file, const void *contents, apr_size_t length, apr_pool_t *scratch_pool)
Create a file at utf8-encoded path file with the contents given by contents of length bytes...
svn_error_t * svn_io_file_trunc(apr_file_t *file, apr_off_t offset, apr_pool_t *pool)
Wrapper for apr_file_trunc().
svn_error_t * svn_io_file_read_full2(apr_file_t *file, void *buf, apr_size_t nbytes, apr_size_t *bytes_read, svn_boolean_t *hit_eof, apr_pool_t *pool)
Wrapper for apr_file_read_full().
svn_error_t * svn_io_file_open(apr_file_t **new_file, const char *fname, apr_int32_t flag, apr_fileperms_t perm, apr_pool_t *pool)
Wrapper for apr_file_open().
svn_error_t * svn_io_set_file_read_only(const char *path, svn_boolean_t ignore_enoent, apr_pool_t *pool)
Make a file as read-only as the operating system allows.
struct svn_io_dirent_t svn_io_dirent_t
Represents the kind and special status of a directory entry.
svn_checksum_kind_t
Various types of checksums.
svn_error_t * svn_io_file_aligned_seek(apr_file_t *file, apr_off_t block_size, apr_off_t *buffer_start, apr_off_t offset, apr_pool_t *scratch_pool)
Set the file pointer of the #APR_BUFFERED file to offset.
svn_error_t * svn_stream_mark(svn_stream_t *stream, svn_stream_mark_t **mark, apr_pool_t *pool)
Set a mark at the current position of a generic stream, which can later be sought back to using svn_s...
svn_error_t * svn_io_file_close(apr_file_t *file, apr_pool_t *pool)
Wrapper for apr_file_close().
svn_error_t * svn_io_remove_file(const char *path, apr_pool_t *pool)
Similar to svn_io_remove_file2(), except with ignore_enoent set to FALSE.
svn_error_t * svn_io_run_diff2(const char *dir, const char *const *user_args, int num_user_args, const char *label1, const char *label2, const char *from, const char *to, int *exitcode, apr_file_t *outfile, apr_file_t *errfile, const char *diff_cmd, apr_pool_t *pool)
Invoke the configured diff program, with user_args (an array of utf8-encoded num_user_args arguments)...
svn_stream_t * svn_stream_buffered(apr_pool_t *result_pool)
Return a generic stream which implements buffered reads and writes.
svn_error_t * svn_io_write_atomic2(const char *final_path, const void *buf, apr_size_t nbytes, const char *copy_perms_path, svn_boolean_t flush_to_disk, apr_pool_t *scratch_pool)
Writes nbytes bytes from *buf to a temporary file inside the same directory as *final_path.
svn_error_t * svn_stream_contents_checksum(svn_checksum_t **checksum, svn_stream_t *stream, svn_checksum_kind_t kind, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
Read the contents of the readable stream stream and return its checksum of type kind in *checksum...
svn_error_t * svn_stream_read(svn_stream_t *stream, char *buffer, apr_size_t *len)
Read from a generic stream until the buffer is completely filled or EOF.
svn_error_t *(* svn_stream_mark_fn_t)(void *baton, svn_stream_mark_t **mark, apr_pool_t *pool)
Mark handler function for a generic stream.
svn_error_t * svn_stream_copy(svn_stream_t *from, svn_stream_t *to, apr_pool_t *pool)
Same as svn_stream_copy3(), but without the cancellation function or stream closing.
svn_error_t *(* svn_close_fn_t)(void *baton)
Close handler function for a generic stream.
void svn_stream_set_seek(svn_stream_t *stream, svn_stream_seek_fn_t seek_fn)
Set stream's seek function to seek_fn.
svn_error_t * svn_io_copy_perms(const char *src, const char *dst, apr_pool_t *pool)
Copy permission flags from src onto the file at dst.
svn_error_t * svn_io_check_path(const char *path, svn_node_kind_t *kind, apr_pool_t *pool)
Determine the kind of path.
svn_error_t * svn_io_file_flush_to_disk(apr_file_t *file, apr_pool_t *pool)
Flush any unwritten data from file to disk.
Subversion checksum routines.
svn_boolean_t special
If kind is svn_node_file, whether this entry is a special file; else FALSE.
svn_error_t * svn_io_file_get_offset(apr_off_t *offset_p, apr_file_t *file, apr_pool_t *pool)
Fetch the current offset of file into *offset_p.
svn_error_t *(* svn_read_fn_t)(void *baton, char *buffer, apr_size_t *len)
Read handler function for a generic stream.
svn_error_t * svn_io_set_file_read_write(const char *path, svn_boolean_t ignore_enoent, apr_pool_t *pool)
Make a file as writable as the operating system allows.
svn_error_t * svn_io_file_putc(char ch, apr_file_t *file, apr_pool_t *pool)
Wrapper for apr_file_putc().
svn_error_t * svn_io_filesizes_different_p(svn_boolean_t *different_p, const char *file1, const char *file2, apr_pool_t *pool)
Set *different_p to TRUE if file1 and file2 have different sizes, else set to FALSE.
svn_io_file_del_t
Used as an argument when creating temporary files to indicate when a file should be removed...
svn_boolean_t svn_stream_supports_partial_read(svn_stream_t *stream)
Returns TRUE if the generic stream supports svn_stream_read2().
svn_error_t * svn_stream_printf(svn_stream_t *stream, apr_pool_t *pool, const char *fmt,...)
Write to stream using a printf-style fmt specifier, passed through apr_psprintf() using memory from p...
void svn_stream_set_mark(svn_stream_t *stream, svn_stream_mark_fn_t mark_fn)
Set stream's mark function to mark_fn.
Represents the kind and special status of a directory entry.
svn_stream_t * svn_stream_checksummed2(svn_stream_t *stream, svn_checksum_t **read_checksum, svn_checksum_t **write_checksum, svn_checksum_kind_t checksum_kind, svn_boolean_t read_all, apr_pool_t *pool)
Return a stream that calculates checksums for all data read and written.
svn_error_t * svn_io_files_contents_three_same_p(svn_boolean_t *same12, svn_boolean_t *same23, svn_boolean_t *same13, const char *file1, const char *file2, const char *file3, apr_pool_t *scratch_pool)
Set *same12 to TRUE if file1 and file2 have the same contents, else set it to FALSE.
svn_error_t * svn_io_file_checksum2(svn_checksum_t **checksum, const char *file, svn_checksum_kind_t kind, apr_pool_t *pool)
Return in *checksum the checksum of type kind of file Use pool for temporary allocations and to alloc...
svn_error_t * svn_io_file_lock(const char *lock_file, svn_boolean_t exclusive, apr_pool_t *pool)
Lock file at lock_file.
svn_error_t * svn_io_dir_remove_nonrecursive(const char *dirname, apr_pool_t *pool)
Wrapper for apr_dir_remove().
svn_stream_t * svn_stream_disown(svn_stream_t *stream, apr_pool_t *pool)
Return a stream allocated in pool which forwards all requests to stream.
svn_error_t * svn_stream_printf_from_utf8(svn_stream_t *stream, const char *encoding, apr_pool_t *pool, const char *fmt,...)
Write to stream using a printf-style fmt specifier, passed through apr_psprintf() using memory from p...
svn_error_t *(* svn_stream_skip_fn_t)(void *baton, apr_size_t len)
Skip data handler function for a generic stream.
svn_error_t * svn_io_get_dirents3(apr_hash_t **dirents, const char *path, svn_boolean_t only_check_type, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
Read all of the disk entries in directory path, a utf8-encoded path.
void svn_stream_set_readline(svn_stream_t *stream, svn_stream_readline_fn_t readline_fn)
Set stream's readline function to readline_fn.
svn_error_t * svn_io_detect_mimetype2(const char **mimetype, const char *file, apr_hash_t *mimetype_map, apr_pool_t *pool)
Examine utf8-encoded file to determine if it can be described by a known (as in, known by this functi...
svn_error_t * svn_io_remove_dir2(const char *path, svn_boolean_t ignore_enoent, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool)
Recursively remove directory path.
svn_error_t * svn_io_get_dirents2(apr_hash_t **dirents, const char *path, apr_pool_t *pool)
Similar to svn_io_get_dirents3, but returns a mapping to svn_io_dirent_t structures instead of svn_io...
svn_error_t * svn_stream_data_available(svn_stream_t *stream, svn_boolean_t *data_available)
When a stream supports polling for available data, obtain a boolean indicating whether data is waitin...
svn_error_t * svn_io_open_unique_file3(apr_file_t **file, const char **temp_path, const char *dirpath, svn_io_file_del_t delete_when, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
Create a writable file, with an arbitrary and unique name, in the directory dirpath.
svn_error_t * svn_io_dir_make_hidden(const char *path, apr_fileperms_t perm, apr_pool_t *pool)
Same as svn_io_dir_make(), but sets the hidden attribute on the directory on systems that support it...
svn_error_t * svn_stream_close(svn_stream_t *stream)
Close a generic stream.
svn_error_t * svn_stream_for_stderr(svn_stream_t **err, apr_pool_t *pool)
Set *err to a generic stream connected to stderr, allocated in pool.
void svn_stream_set_close(svn_stream_t *stream, svn_close_fn_t close_fn)
Set stream's close function to close_fn.
svn_stream_t * svn_stream_checksummed(svn_stream_t *stream, const unsigned char **read_digest, const unsigned char **write_digest, svn_boolean_t read_all, apr_pool_t *pool)
Similar to svn_stream_checksummed2(), but always returning the MD5 checksum in read_digest and write_...
void svn_stream_set_write(svn_stream_t *stream, svn_write_fn_t write_fn)
Set stream's write function to write_fn.
void svn_stream_set_read(svn_stream_t *stream, svn_read_fn_t read_fn)
Set stream's read function to read_fn.
svn_node_kind_t
The various types of nodes in the Subversion filesystem.
svn_error_t * svn_stream_copy3(svn_stream_t *from, svn_stream_t *to, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool)
Read the contents of the readable stream from and write them to the writable stream to calling cancel...
Remove when the file is closed.
svn_error_t * svn_stream_read_full(svn_stream_t *stream, char *buffer, apr_size_t *len)
Read from a generic stream until buffer is filled upto *len or until EOF is reached.
svn_error_t * svn_io_read_length_line(apr_file_t *file, char *buf, apr_size_t *limit, apr_pool_t *pool)
Read a line from file into buf, but not exceeding *limit bytes.
svn_error_t * svn_io_file_affected_time(apr_time_t *apr_time, const char *path, apr_pool_t *pool)
Set *apr_time to the time of last modification of the contents of the file path.
svn_stream_t * svn_stream_from_string(const svn_string_t *str, apr_pool_t *pool)
Return a generic read-only stream connected to string str.
svn_error_t * svn_io_start_cmd2(apr_proc_t *cmd_proc, const char *path, const char *cmd, const char *const *args, svn_boolean_t inherit, svn_boolean_t infile_pipe, apr_file_t *infile, svn_boolean_t outfile_pipe, apr_file_t *outfile, svn_boolean_t errfile_pipe, apr_file_t *errfile, apr_pool_t *pool)
Similar to svn_io_start_cmd3() but with env always set to NULL.
svn_error_t * svn_io_file_move(const char *from_path, const char *to_path, apr_pool_t *pool)
Move the file from from_path to to_path, even across device boundaries.
svn_error_t * svn_io_set_file_affected_time(apr_time_t apr_time, const char *path, apr_pool_t *pool)
Set the timestamp of file path to apr_time.
svn_error_t * svn_io_open_unique_file(apr_file_t **f, const char **unique_name_p, const char *path, const char *suffix, svn_boolean_t delete_on_close, apr_pool_t *pool)
Like svn_io_open_unique_file2, but can't delete on pool cleanup.
svn_error_t * svn_io_run_diff3(const char *dir, const char *mine, const char *older, const char *yours, const char *mine_label, const char *older_label, const char *yours_label, apr_file_t *merged, int *exitcode, const char *diff3_cmd, apr_pool_t *pool)
Similar to svn_io_run_diff3_2(), but with user_args set to NULL.
svn_io_dirent2_t * svn_io_dirent2_create(apr_pool_t *result_pool)
Creates a new svn_io_dirent2_t structure.
svn_error_t * svn_io_set_file_read_write_carefully(const char *path, svn_boolean_t enable_write, svn_boolean_t ignore_enoent, apr_pool_t *pool)
Similar to svn_io_set_file_read_* functions.
svn_error_t * svn_io_start_cmd(apr_proc_t *cmd_proc, const char *path, const char *cmd, const char *const *args, svn_boolean_t inherit, apr_file_t *infile, apr_file_t *outfile, apr_file_t *errfile, apr_pool_t *pool)
Similar to svn_io_start_cmd2() but with infile_pipe, outfile_pipe, and errfile_pipe always FALSE...
svn_error_t * svn_io_lock_open_file(apr_file_t *lockfile_handle, svn_boolean_t exclusive, svn_boolean_t nonblocking, apr_pool_t *pool)
Lock the file lockfile_handle.
svn_error_t * svn_io_temp_dir(const char **dir, apr_pool_t *pool)
Set *dir to a directory path (allocated in pool) deemed usable for the creation of temporary files an...
svn_error_t * svn_io_stat(apr_finfo_t *finfo, const char *fname, apr_int32_t wanted, apr_pool_t *pool)
Wrapper for apr_stat().
svn_error_t * svn_io_run_diff3_3(int *exitcode, const char *dir, const char *mine, const char *older, const char *yours, const char *mine_label, const char *older_label, const char *yours_label, apr_file_t *merged, const char *diff3_cmd, const apr_array_header_t *user_args, apr_pool_t *pool)
Invoke the configured diff3 program, in utf8-encoded dir like this:
svn_error_t * svn_stream_open_unique(svn_stream_t **stream, const char **temp_path, const char *dirpath, svn_io_file_del_t delete_when, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
Create a writable stream to a file in the directory dirpath.
svn_error_t * svn_stream_reset(svn_stream_t *stream)
Reset a generic stream back to its origin.
void svn_io_sleep_for_timestamps(const char *path, apr_pool_t *pool)
Sleep to ensure that any files modified after we exit have a different timestamp than the one we reco...
svn_error_t * svn_stringbuf_from_file2(svn_stringbuf_t **result, const char *filename, apr_pool_t *pool)
Set *result to a string containing the contents of filename, which is either "-" (indicating that std...
svn_error_t * svn_stringbuf_from_aprfile(svn_stringbuf_t **result, apr_file_t *file, apr_pool_t *pool)
Sets *result to a string containing the contents of the already opened file.
svn_error_t * svn_io_file_write(apr_file_t *file, const void *buf, apr_size_t *nbytes, apr_pool_t *pool)
Wrapper for apr_file_write().
apr_int64_t svn_filesize_t
The size of a file in the Subversion FS.
svn_boolean_t svn_stream_supports_mark(svn_stream_t *stream)
Returns TRUE if the generic stream supports svn_stream_mark().
svn_error_t * svn_stringbuf_from_stream(svn_stringbuf_t **result, svn_stream_t *stream, apr_size_t len_hint, apr_pool_t *result_pool)
Read the contents of stream into memory, from its current position to its end, returning the data in ...
svn_error_t * svn_stream_skip(svn_stream_t *stream, apr_size_t len)
Skip len bytes from a generic stream.
svn_error_t * svn_stream_readline(svn_stream_t *stream, svn_stringbuf_t **stringbuf, const char *eol, svn_boolean_t *eof, apr_pool_t *pool)
Allocate *stringbuf in pool, and read into it one line (terminated by eol) from stream.
svn_boolean_t svn_stream_supports_reset(svn_stream_t *stream)
Returns TRUE if the generic stream supports svn_stream_reset().
svn_error_t * svn_io_file_checksum(unsigned char digest[], const char *file, apr_pool_t *pool)
Put the md5 checksum of file into digest.
void svn_stream_set_data_available(svn_stream_t *stream, svn_stream_data_available_fn_t data_available)
Set stream's data available function to data_available_fn.
svn_error_t * svn_stream_copy2(svn_stream_t *from, svn_stream_t *to, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool)
Same as svn_stream_copy3() but the streams are not closed.
svn_error_t * svn_io_dir_make(const char *path, apr_fileperms_t perm, apr_pool_t *pool)
Wrapper for apr_dir_make().
svn_error_t * svn_stream_seek(svn_stream_t *stream, const svn_stream_mark_t *mark)
Seek to a mark in a generic stream.
Remove when the associated pool is cleared.
svn_error_t * svn_stream_open_readonly(svn_stream_t **stream, const char *path, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
Create a stream to read the file at path.
svn_error_t * svn_io_dir_open(apr_dir_t **new_dir, const char *dirname, apr_pool_t *pool)
Wrapper for apr_dir_open().
svn_error_t * svn_io_open_uniquely_named(apr_file_t **file, const char **unique_name, const char *dirpath, const char *filename, const char *suffix, svn_io_file_del_t delete_when, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
Open a new file (for reading and writing) with a unique name based on utf-8 encoded filename...
svn_error_t * svn_io_copy_file(const char *src, const char *dst, svn_boolean_t copy_perms, apr_pool_t *pool)
Copy src to dst atomically, in a "byte-for-byte" manner.
svn_error_t * svn_io_read_link(svn_string_t **dest, const char *path, apr_pool_t *pool)
Set *dest to the path that the symlink at path references.
apr_time_t mtime
The time the file was last modified.
svn_error_t * svn_io_file_read_full(apr_file_t *file, void *buf, apr_size_t nbytes, apr_size_t *bytes_read, apr_pool_t *pool)
Similar to svn_io_file_read_full2 with hit_eof being set to NULL.
svn_error_t * svn_io_file_read(apr_file_t *file, void *buf, apr_size_t *nbytes, apr_pool_t *pool)
Wrapper for apr_file_read().
svn_error_t * svn_io_is_file_executable(svn_boolean_t *executable, const char *path, apr_pool_t *pool)
Determine whether a file is executable by the current user.
svn_error_t * svn_io_file_size_get(svn_filesize_t *filesize_p, apr_file_t *file, apr_pool_t *pool)
Set *filesize_p to the size of file.
svn_error_t * svn_io_unlock_open_file(apr_file_t *lockfile_handle, apr_pool_t *pool)
Unlock the file lockfile_handle.
svn_stream_t * svn_stream_from_aprfile2(apr_file_t *file, svn_boolean_t disown, apr_pool_t *pool)
Create a stream from an APR file.
svn_error_t *(* svn_write_fn_t)(void *baton, const char *data, apr_size_t *len)
Write handler function for a generic stream.
svn_error_t * svn_io_dir_walk(const char *dirname, apr_int32_t wanted, svn_io_walk_func_t walk_func, void *walk_baton, apr_pool_t *pool)
Similar to svn_io_dir_walk(), but only calls walk_func for files of type APR_DIR (directory) and APR_...
svn_error_t * svn_stream_contents_same2(svn_boolean_t *same, svn_stream_t *stream1, svn_stream_t *stream2, apr_pool_t *pool)
Set *same to TRUE if stream1 and stream2 have the same contents, else set it to FALSE.
svn_error_t * svn_string_from_stream2(svn_string_t **result, svn_stream_t *stream, apr_size_t len_hint, apr_pool_t *result_pool)
Read the contents of stream into memory, from its current position to its end, returning the data in ...
struct svn_io_dirent2_t svn_io_dirent2_t
A set of directory entry data elements as returned by svn_io_get_dirents.
svn_error_t * svn_io_run_diff(const char *dir, const char *const *user_args, int num_user_args, const char *label1, const char *label2, const char *from, const char *to, int *exitcode, apr_file_t *outfile, apr_file_t *errfile, const char *diff_cmd, apr_pool_t *pool)
Similar to svn_io_run_diff2() but with diff_cmd encoded in internal encoding used by APR...
svn_error_t * svn_io_wait_for_cmd(apr_proc_t *cmd_proc, const char *cmd, int *exitcode, apr_exit_why_e *exitwhy, apr_pool_t *pool)
Wait for the process *cmd_proc to complete and optionally retrieve its exit code. ...
svn_error_t * svn_io_file_create_empty(const char *file, apr_pool_t *scratch_pool)
Create an empty file at utf8-encoded path file.
svn_error_t * svn_io_dir_file_copy(const char *src_path, const char *dest_path, const char *file, apr_pool_t *pool)
Copy the file whose basename (or relative path) is file within directory src_path to the same basenam...
svn_error_t * svn_io_dir_make_sgid(const char *path, apr_fileperms_t perm, apr_pool_t *pool)
Same as svn_io_dir_make(), but attempts to set the sgid on the directory on systems that support it...
struct svn_stream_t svn_stream_t
An abstract stream of bytes–either incoming or outgoing or both.
svn_filesize_t filesize
The filesize of this entry or undefined for a directory.
Subversion's data types.
svn_error_t * svn_stream_puts(svn_stream_t *stream, const char *str)
Write NULL-terminated string str to stream.
svn_error_t * svn_io_file_name_get(const char **filename, apr_file_t *file, apr_pool_t *pool)
Wrapper for apr_file_name_get().
svn_error_t *(* svn_io_walk_func_t)(void *baton, const char *path, const apr_finfo_t *finfo, apr_pool_t *pool)
Callback function type for svn_io_dir_walk()
svn_error_t * svn_io_copy_link(const char *src, const char *dst, apr_pool_t *pool)
Copy symbolic link src to dst atomically.
svn_error_t * svn_io_write_unique(const char **tmp_path, const char *dirpath, const void *buf, apr_size_t nbytes, svn_io_file_del_t delete_when, apr_pool_t *pool)
Open a unique file in dirpath, and write nbytes from buf to the file before flushing it to disk and c...
svn_error_t * svn_stream_contents_same(svn_boolean_t *same, svn_stream_t *stream1, svn_stream_t *stream2, apr_pool_t *pool)
Same as svn_stream_contents_same2(), but the streams will not be closed.
A generic checksum representation.
svn_error_t * svn_io_check_resolved_path(const char *path, svn_node_kind_t *kind, apr_pool_t *pool)
Like svn_io_check_path(), but resolve symlinks.
svn_error_t * svn_io_parse_mimetypes_file(apr_hash_t **type_map, const char *mimetypes_file, apr_pool_t *pool)
Parse utf8-encoded mimetypes_file as a MIME types file (such as is provided with Apache HTTP Server)...
svn_stream_t * svn_stream_empty(apr_pool_t *pool)
Create a stream that is empty for reading and infinite for writing.
svn_error_t * svn_stringbuf_from_file(svn_stringbuf_t **result, const char *filename, apr_pool_t *pool)
Similar to svn_stringbuf_from_file2(), except that if filename is "-", return the error SVN_ERR_UNSUP...
#define SVN_DEPRECATED
Macro used to mark deprecated functions.
svn_error_t * svn_io_dir_read(apr_finfo_t *finfo, apr_int32_t wanted, apr_dir_t *thedir, apr_pool_t *pool)
Wrapper for apr_dir_read().
svn_error_t *(* svn_cancel_func_t)(void *cancel_baton)
A user defined callback that subversion will call with a user defined baton to see if the current ope...
svn_stream_t * svn_stream_create(void *baton, apr_pool_t *pool)
Create a generic stream.
svn_node_kind_t kind
The kind of this entry.
void svn_stream_set_skip(svn_stream_t *stream, svn_stream_skip_fn_t skip_fn)
Set stream's skip function to skip_fn.
svn_error_t * svn_io_file_getc(char *ch, apr_file_t *file, apr_pool_t *pool)
Wrapper for apr_file_getc().
struct svn_stream_mark_t svn_stream_mark_t
An opaque type which represents a mark on a stream.
svn_error_t * svn_io_run_diff3_2(int *exitcode, const char *dir, const char *mine, const char *older, const char *yours, const char *mine_label, const char *older_label, const char *yours_label, apr_file_t *merged, const char *diff3_cmd, const apr_array_header_t *user_args, apr_pool_t *pool)
Similar to svn_io_run_diff3_3(), but with diff3_cmd encoded in internal encoding used by APR...
svn_error_t * svn_io_dir_walk2(const char *dirname, apr_int32_t wanted, svn_io_walk_func_t walk_func, void *walk_baton, apr_pool_t *pool)
Recursively walk the directory rooted at dirname, a utf8-encoded path, invoking walk_func (with walk_...
svn_stream_t * svn_stream_lazyopen_create(svn_stream_lazyopen_func_t open_func, void *open_baton, svn_boolean_t open_on_close, apr_pool_t *result_pool)
Return a generic stream which wraps another primary stream, delaying the "opening" of that stream unt...
svn_error_t *(* svn_stream_lazyopen_func_t)(svn_stream_t **stream, void *baton, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
A function type provided for use as a callback from svn_stream_lazyopen_create(). ...
svn_boolean_t svn_io_is_binary_data(const void *buf, apr_size_t len)
Examine up to len bytes of data in buf to determine if the can be considered binary data...
svn_error_t *(* svn_stream_readline_fn_t)(void *baton, svn_stringbuf_t **stringbuf, const char *eol, svn_boolean_t *eof, apr_pool_t *pool)
Readline handler function for a generic stream.
svn_error_t * svn_io_detect_mimetype(const char **mimetype, const char *file, apr_pool_t *pool)
Like svn_io_detect_mimetype2, but with mimetypes_map set to NULL.
svn_error_t * svn_io_file_lock2(const char *lock_file, svn_boolean_t exclusive, svn_boolean_t nonblocking, apr_pool_t *pool)
Lock file at lock_file.
A set of directory entry data elements as returned by svn_io_get_dirents.
svn_error_t * svn_io_dir_close(apr_dir_t *thedir)
Wrapper for apr_dir_close().
svn_error_t * svn_io_dir_empty(svn_boolean_t *is_empty_p, const char *path, apr_pool_t *pool)
Set *is_empty_p to TRUE if directory path is empty, else to FALSE if it is not empty.
svn_error_t * svn_io_file_info_get(apr_finfo_t *finfo, apr_int32_t wanted, apr_file_t *file, apr_pool_t *pool)
Wrapper for apr_file_info_get().
svn_error_t * svn_io_open_unique_file2(apr_file_t **f, const char **unique_name_p, const char *path, const char *suffix, svn_io_file_del_t delete_when, apr_pool_t *pool)
Like svn_io_open_uniquely_named(), but takes a joined dirpath and filename, and a single pool...
svn_error_t * svn_io_get_dirents(apr_hash_t **dirents, const char *path, apr_pool_t *pool)
Similar to svn_io_get_dirents2(), but *dirents is a hash table with svn_node_kind_t values...
svn_error_t * svn_io_append_file(const char *src, const char *dst, apr_pool_t *pool)
Append src to dst.
svn_error_t * svn_io_files_contents_same_p(svn_boolean_t *same, const char *file1, const char *file2, apr_pool_t *pool)
Set *same to TRUE if file1 and file2 have the same contents, else set it to FALSE.
svn_error_t * svn_io_make_dir_recursively(const char *path, apr_pool_t *pool)
Create directory path on the file system, creating intermediate directories as required, like mkdir -p.
svn_error_t * svn_stream_for_stdin(svn_stream_t **in, apr_pool_t *pool)
Similar to svn_stream_for_stdin2(), but with buffering being disabled.
svn_boolean_t special
If kind is svn_node_file, whether this entry is a special file; else FALSE.
svn_error_t * svn_io_copy_dir_recursively(const char *src, const char *dst_parent, const char *dst_basename, svn_boolean_t copy_perms, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool)
Recursively copy directory src into dst_parent, as a new entry named dst_basename.
svn_stream_t * svn_stream_from_aprfile(apr_file_t *file, apr_pool_t *pool)
Similar to svn_stream_from_aprfile2(), except that the file will always be disowned.
svn_error_t * svn_io_stat_dirent2(const svn_io_dirent2_t **dirent_p, const char *path, svn_boolean_t verify_truename, svn_boolean_t ignore_enoent, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
Create a svn_io_dirent2_t instance for path.
svn_error_t * svn_io_file_write_full(apr_file_t *file, const void *buf, apr_size_t nbytes, apr_size_t *bytes_written, apr_pool_t *pool)
Wrapper for apr_file_write_full().
svn_error_t * svn_stream_open_writable(svn_stream_t **stream, const char *path, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
Create a stream to write a file at path.
svn_io_dirent2_t * svn_io_dirent2_dup(const svn_io_dirent2_t *item, apr_pool_t *result_pool)
Duplicates a svn_io_dirent2_t structure into result_pool.
svn_stream_t * svn_stream_from_stringbuf(svn_stringbuf_t *str, apr_pool_t *pool)
Return a generic stream connected to stringbuf str.
svn_error_t * svn_stream_for_stdin2(svn_stream_t **in, svn_boolean_t buffered, apr_pool_t *pool)
Set *in to a generic stream connected to stdin, allocated in pool.
svn_error_t * svn_io_filesizes_three_different_p(svn_boolean_t *different_p12, svn_boolean_t *different_p23, svn_boolean_t *different_p13, const char *file1, const char *file2, const char *file3, apr_pool_t *scratch_pool)
Set *different_p12 to non-zero if file1 and file2 have different sizes, else set to zero...
svn_error_t * svn_io_file_rename2(const char *from_path, const char *to_path, svn_boolean_t flush_to_disk, apr_pool_t *pool)
Rename and/or move the node (not necessarily a regular file) at from_path to a new path to_path withi...
svn_error_t * svn_io_get_dir_filenames(apr_hash_t **dirents, const char *path, apr_pool_t *pool)
Read all of the disk entries in directory path, a utf8-encoded path.
svn_error_t * svn_io_remove_file2(const char *path, svn_boolean_t ignore_enoent, apr_pool_t *scratch_pool)
Remove file path, a utf8-encoded path.
svn_error_t * svn_io_set_file_executable(const char *path, svn_boolean_t executable, svn_boolean_t ignore_enoent, apr_pool_t *pool)
Set path's "executability" (but do nothing if it is a symlink).
int svn_boolean_t
YABT: Yet Another Boolean Type.
svn_stream_t * svn_stream_tee(svn_stream_t *out1, svn_stream_t *out2, apr_pool_t *pool)
Return a writable stream which, when written to, writes to both of the underlying streams...
svn_error_t * svn_stream_write(svn_stream_t *stream, const char *data, apr_size_t *len)
Write to a generic stream.
svn_node_kind_t kind
The kind of this entry.
void svn_stream_set_baton(svn_stream_t *stream, void *baton)
Set stream's baton to baton.
svn_error_t * svn_io_start_cmd3(apr_proc_t *cmd_proc, const char *path, const char *cmd, const char *const *args, const char *const *env, svn_boolean_t inherit, svn_boolean_t infile_pipe, apr_file_t *infile, svn_boolean_t outfile_pipe, apr_file_t *outfile, svn_boolean_t errfile_pipe, apr_file_t *errfile, apr_pool_t *pool)
Start cmd with args, using utf8-encoded path as working directory.
svn_stream_t * svn_stream_compressed(svn_stream_t *stream, apr_pool_t *pool)
Return a stream that decompresses all data read and compresses all data written.
svn_error_t * svn_io_write_atomic(const char *final_path, const void *buf, apr_size_t nbytes, const char *copy_perms_path, apr_pool_t *scratch_pool)
Similar to svn_io_write_atomic2(), but with flush_to_disk set to TRUE.
void svn_stream_set_read2(svn_stream_t *stream, svn_read_fn_t read_fn, svn_read_fn_t read_full_fn)
Set stream's read functions to read_fn and read_full_fn.
svn_error_t * svn_io_file_flush(apr_file_t *file, apr_pool_t *scratch_pool)
Wrapper for apr_file_flush().
svn_error_t * svn_io_file_rename(const char *from_path, const char *to_path, apr_pool_t *pool)
Similar to svn_io_file_rename2(), but with flush_to_disk set to FALSE.
svn_error_t * svn_io_stat_dirent(const svn_io_dirent2_t **dirent_p, const char *path, svn_boolean_t ignore_enoent, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
Similar to svn_io_stat_dirent2(), but always passes FALSE for verify_truename.
svn_error_t * svn_io_create_unique_link(const char **unique_name_p, const char *path, const char *dest, const char *suffix, apr_pool_t *pool)
Like svn_io_open_unique_file(), except that instead of creating a file, a symlink is generated that r...
svn_error_t * svn_stream_for_stdout(svn_stream_t **out, apr_pool_t *pool)
Set *out to a generic stream connected to stdout, allocated in pool.
A buffered string, capable of appending without an allocation and copy for each append.
svn_error_t * svn_io_file_create(const char *file, const char *contents, apr_pool_t *pool)
Create a file at utf8-encoded path file with the contents given by the null-terminated string content...
svn_error_t * svn_stream_read2(svn_stream_t *stream, char *buffer, apr_size_t *len)
Read all currently available upto *len into buffer.
svn_error_t * svn_io_remove_dir(const char *path, apr_pool_t *pool)
Similar to svn_io_remove_dir2(), but with ignore_enoent set to FALSE and cancel_func and cancel_baton...
svn_error_t * svn_string_from_stream(svn_string_t **result, svn_stream_t *stream, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
Similar to svn_string_from_stream2(), but always passes 0 for len_hint.
svn_error_t * svn_io_run_cmd(const char *path, const char *cmd, const char *const *args, int *exitcode, apr_exit_why_e *exitwhy, svn_boolean_t inherit, apr_file_t *infile, apr_file_t *outfile, apr_file_t *errfile, apr_pool_t *pool)
Run a command to completion, by first calling svn_io_start_cmd() and then calling svn_io_wait_for_cmd...