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,
237 apr_pool_t *result_pool,
238 apr_pool_t *scratch_pool);
269 const char **temp_path,
272 apr_pool_t *result_pool,
273 apr_pool_t *scratch_pool);
286 const char **unique_name_p,
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,
1024 apr_pool_t *result_pool,
1025 apr_pool_t *scratch_pool);
1043 apr_pool_t *result_pool,
1044 apr_pool_t *scratch_pool);
1067 const char **temp_path,
1068 const char *dirpath,
1070 apr_pool_t *result_pool,
1071 apr_pool_t *scratch_pool);
1143 apr_size_t len_hint,
1144 apr_pool_t *result_pool);
1223 const unsigned char **read_digest,
1224 const unsigned char **write_digest,
1391 __attribute__((format(printf, 3, 4)));
1404 const
char *encoding,
1408 __attribute__((format(printf, 4, 5)));
1520 apr_pool_t *result_pool,
1521 apr_pool_t *scratch_pool);
1541 apr_pool_t *result_pool,
1542 apr_pool_t *scratch_pool);
1567 apr_pool_t *result_pool);
1588 const
char *filename,
1600 const
char *filename,
1628 apr_pool_t *scratch_pool);
1700 apr_pool_t *result_pool,
1701 apr_pool_t *scratch_pool);
1746 apr_pool_t *result_pool,
1747 apr_pool_t *scratch_pool);
1761 apr_pool_t *result_pool,
1762 apr_pool_t *scratch_pool);
1768 const apr_finfo_t *finfo,
1850 const
char *const *args,
1851 const
char *const *env,
1856 apr_file_t *outfile,
1858 apr_file_t *errfile,
1872 const
char *const *args,
1877 apr_file_t *outfile,
1879 apr_file_t *errfile,
1894 const
char *const *args,
1897 apr_file_t *outfile,
1898 apr_file_t *errfile,
1921 apr_exit_why_e *exitwhy,
1931 const
char *const *args,
1933 apr_exit_why_e *exitwhy,
1936 apr_file_t *outfile,
1937 apr_file_t *errfile,
1962 const
char *const *user_args,
1969 apr_file_t *outfile,
1970 apr_file_t *errfile,
1971 const
char *diff_cmd,
1981 const
char *const *user_args,
1988 apr_file_t *outfile,
1989 apr_file_t *errfile,
1990 const
char *diff_cmd,
2035 const
char *mine_label,
2036 const
char *older_label,
2037 const
char *yours_label,
2039 const
char *diff3_cmd,
2040 const apr_array_header_t *user_args,
2056 const
char *mine_label,
2057 const
char *older_label,
2058 const
char *yours_label,
2060 const
char *diff3_cmd,
2061 const apr_array_header_t *user_args,
2074 const
char *mine_label,
2075 const
char *older_label,
2076 const
char *yours_label,
2079 const
char *diff3_cmd,
2092 const
char *mimetypes_file,
2112 apr_hash_t *mimetype_map,
2144 apr_fileperms_t perm,
2197 apr_size_t *bytes_read,
2212 apr_size_t *bytes_read,
2219 apr_seek_where_t where,
2241 apr_off_t block_size,
2242 apr_off_t *buffer_start,
2244 apr_pool_t *scratch_pool);
2258 apr_pool_t *scratch_pool);
2267 apr_size_t *bytes_written,
2290 const
char* copy_perms_path,
2291 apr_pool_t *scratch_pool);
2309 const
char *dirpath,
2340 const
char *to_path,
2354 const
char *to_path,
2361 apr_fileperms_t perm,
2368 apr_fileperms_t perm,
2383 apr_fileperms_t perm,
2389 const
char *dirname,
2484 apr_pool_t *result_pool,
2485 apr_pool_t *scratch_pool);
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_stringbuf_from_stream(svn_stringbuf_t **str, svn_stream_t *stream, apr_size_t len_hint, apr_pool_t *result_pool)
Set *str to a string buffer allocated in result_pool that contains all data from the current position...
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_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_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.
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_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_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.
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_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_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.
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(). ...
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_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_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_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_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_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_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.
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_write_fn_t)(void *baton, const char *data, apr_size_t *len)
Write handler function for a generic stream.
svn_error_t *(* svn_stream_seek_fn_t)(void *baton, const svn_stream_mark_t *mark)
Seek handler function for a generic stream.
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_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_close_fn_t)(void *baton)
Close handler function for a generic stream.
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_UNS...
#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_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_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_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.
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...
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)
Set *in to a generic stream connected to stdin, allocated in pool.
svn_boolean_t special
If kind is svn_node_file, whether this entry is a special file; else FALSE.
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_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_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_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)
Writes nbytes bytes from *buf to a temporary file inside the same directory as *final_path.
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)
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_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.
svn_error_t *(* svn_stream_skip_fn_t)(void *baton, apr_size_t len)
Skip data handler function for a generic stream.
A buffered string, capable of appending without an allocation and copy for each append.
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_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)
Read the contents of stream into memory, returning the data in result.
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...