Alien-SVN
view release on metacpan or search on metacpan
src/subversion/subversion/include/svn_io.h view on Meta::CPAN
*
* @note This is the APR mtime which corresponds to the traditional mtime
* on Unix, and the last write time on Windows.
*/
svn_error_t *
svn_io_file_affected_time(apr_time_t *apr_time,
const char *path,
apr_pool_t *pool);
/** Set the timestamp of file @a path to @a apr_time. @a path is
* utf8-encoded.
*
* @note This is the APR mtime which corresponds to the traditional mtime
* on Unix, and the last write time on Windows.
*/
svn_error_t *
svn_io_set_file_affected_time(apr_time_t apr_time,
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 recorded. If @a path is not NULL, check if we
* can determine how long we should wait for a new timestamp on the filesystem
* containing @a path, an existing file or directory. If @a path is NULL or we
* can't determine the timestamp resolution, sleep until the next second.
*
* Use @a pool for any necessary allocations. @a pool can be null if @a path
* is NULL.
*
* Errors while retrieving the timestamp resolution will result in sleeping
* to the next second, to keep the working copy stable in error conditions.
*
* @since New in 1.6.
*/
void
svn_io_sleep_for_timestamps(const char *path, apr_pool_t *pool);
/** Set @a *different_p to TRUE if @a file1 and @a file2 have different
* sizes, else set to FALSE. Both @a file1 and @a file2 are utf8-encoded.
*
* Setting @a *different_p to zero does not mean the files definitely
* have the same size, it merely means that the sizes are not
* definitely different. That is, if the size of one or both files
* cannot be determined, then the sizes are not known to be different,
* so @a *different_p is set to FALSE.
*/
svn_error_t *
svn_io_filesizes_different_p(svn_boolean_t *different_p,
const char *file1,
const char *file2,
apr_pool_t *pool);
/** Set @a *different_p12 to non-zero if @a file1 and @a file2 have different
* sizes, else set to zero. Do the similar for @a *different_p23 with
* @a file2 and @a file3, and @a *different_p13 for @a file1 and @a file3.
* The filenames @a file1, @a file2 and @a file3 are utf8-encoded.
*
* Setting @a *different_p12 to zero does not mean the files definitely
* have the same size, it merely means that the sizes are not
* definitely different. That is, if the size of one or both files
* cannot be determined (due to stat() returning an error), then the sizes
* are not known to be different, so @a *different_p12 is set to 0.
*
* @since New in 1.8.
*/
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);
/** Return in @a *checksum the checksum of type @a kind of @a file
* Use @a pool for temporary allocations and to allocate @a *checksum.
*
* @since New in 1.6.
*/
svn_error_t *
svn_io_file_checksum2(svn_checksum_t **checksum,
const char *file,
svn_checksum_kind_t kind,
apr_pool_t *pool);
/** Put the md5 checksum of @a file into @a digest.
* @a digest points to @c APR_MD5_DIGESTSIZE bytes of storage.
* Use @a pool only for temporary allocations.
*
* @deprecated Provided for backward compatibility with the 1.5 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_io_file_checksum(unsigned char digest[],
const char *file,
apr_pool_t *pool);
/** Set @a *same to TRUE if @a file1 and @a file2 have the same
* contents, else set it to FALSE. Use @a pool for temporary allocations.
*/
svn_error_t *
svn_io_files_contents_same_p(svn_boolean_t *same,
const char *file1,
const char *file2,
apr_pool_t *pool);
/** Set @a *same12 to TRUE if @a file1 and @a file2 have the same
* contents, else set it to FALSE. Do the similar for @a *same23
* with @a file2 and @a file3, and @a *same13 for @a file1 and @a
* file3. The filenames @a file1, @a file2 and @a file3 are
* utf8-encoded. Use @a scratch_pool for temporary allocations.
*
* @since New in 1.8.
*/
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,
src/subversion/subversion/include/svn_io.h view on Meta::CPAN
*
* @note The `.' and `..' directories normally returned by
* apr_dir_read() are NOT returned in the hash.
*
* @since New in 1.4.
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
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 @a path, a utf8-encoded
* path. Set @a *dirents to a hash mapping dirent names (<tt>char *</tt>) to
* #svn_io_dirent2_t structures, allocated in @a pool.
*
* If @a only_check_type is set to @c TRUE, only the kind and special
* fields of the svn_io_dirent2_t are filled.
*
* @note The `.' and `..' directories normally returned by
* apr_dir_read() are NOT returned in the hash.
*
* @note The kind field in the @a dirents is set according to the mapping
* as documented for svn_io_check_path().
*
* @since New in 1.7.
*/
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);
/** Similar to svn_io_get_dirents3, but returns a mapping to svn_io_dirent_t
* structures instead of svn_io_dirent2_t and with only a single pool.
*
* @since New in 1.3.
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_io_get_dirents2(apr_hash_t **dirents,
const char *path,
apr_pool_t *pool);
/** Similar to svn_io_get_dirents2(), but @a *dirents is a hash table
* with #svn_node_kind_t values.
*
* @deprecated Provided for backwards compatibility with the 1.2 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_io_get_dirents(apr_hash_t **dirents,
const char *path,
apr_pool_t *pool);
/** Create a svn_io_dirent2_t instance for path. Specialized variant of
* svn_io_stat() that directly translates node_kind and special.
*
* If @a verify_truename is @c TRUE, an additional check is performed to
* verify the truename of the last path component on case insensitive
* filesystems. This check is expensive compared to a just a stat,
* but certainly cheaper than a full truename calculation using
* apr_filepath_merge() which verifies all path components.
*
* If @a ignore_enoent is set to @c TRUE, set *dirent_p->kind to
* svn_node_none instead of returning an error.
*
* @since New in 1.8.
*/
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);
/** Similar to svn_io_stat_dirent2(), but always passes FALSE for
* @a verify_truename.
*
* @since New in 1.7.
* @deprecated Provided for backwards compatibility with the 1.7 API.
*/
SVN_DEPRECATED
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);
/** Callback function type for svn_io_dir_walk() */
typedef svn_error_t * (*svn_io_walk_func_t)(void *baton,
const char *path,
const apr_finfo_t *finfo,
apr_pool_t *pool);
/** Recursively walk the directory rooted at @a dirname, a
* utf8-encoded path, invoking @a walk_func (with @a walk_baton) for
* each item in the tree. For a given directory, invoke @a walk_func
* on the directory itself before invoking it on any children thereof.
*
* Deliver to @a walk_func the information specified by @a wanted,
* which is a combination of @c APR_FINFO_* flags, plus the
* information specified by @c APR_FINFO_TYPE and @c APR_FINFO_NAME.
*
* Use @a pool for all allocations.
*
* @note This function does not currently pass all file types to @a
* walk_func -- only APR_DIR, APR_REG, and APR_LNK. We reserve the
* right to pass additional file types through this interface in the
* future, though, so implementations of this callback should
* explicitly test FINFO->filetype. See the APR library's
* apr_filetype_e enum for the various filetypes and their meanings.
*
src/subversion/subversion/include/svn_io.h view on Meta::CPAN
void *buf,
apr_size_t nbytes,
apr_size_t *bytes_read,
apr_pool_t *pool);
/** Wrapper for apr_file_seek(). */
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_write(). */
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_full(). */
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);
/**
* Open a unique file in @a dirpath, and write @a nbytes from @a buf to
* the file before flushing it to disk and closing it. Return the name
* of the newly created file in @a *tmp_path, allocated in @a pool.
*
* If @a dirpath is @c NULL, use the path returned from svn_io_temp_dir().
* (Note that when using the system-provided temp directory, it may not
* be possible to atomically rename the resulting file due to cross-device
* issues.)
*
* The file will be deleted according to @a delete_when.
*
* @since New in 1.6.
*/
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);
/** Wrapper for apr_file_trunc().
* @since New in 1.6. */
svn_error_t *
svn_io_file_trunc(apr_file_t *file,
apr_off_t offset,
apr_pool_t *pool);
/** Wrapper for apr_stat(). @a fname is utf8-encoded. */
svn_error_t *
svn_io_stat(apr_finfo_t *finfo,
const char *fname,
apr_int32_t wanted,
apr_pool_t *pool);
/** Rename and/or move the node (not necessarily a regular file) at
* @a from_path to a new path @a to_path within the same filesystem.
* In some cases, an existing node at @a to_path will be overwritten.
*
* A wrapper for apr_file_rename(). @a from_path and @a to_path are
* utf8-encoded.
*/
svn_error_t *
svn_io_file_rename(const char *from_path,
const char *to_path,
apr_pool_t *pool);
/** Move the file from @a from_path to @a to_path, even across device
* boundaries. Overwrite @a to_path if it exists.
*
* @note This function is different from svn_io_file_rename in that the
* latter fails in the 'across device boundaries' case.
*
* @since New in 1.3.
*/
svn_error_t *
svn_io_file_move(const char *from_path,
const char *to_path,
apr_pool_t *pool);
/** Wrapper for apr_dir_make(). @a path is utf8-encoded. */
svn_error_t *
svn_io_dir_make(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_io_dir_make_hidden(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. Does not return an error if
* the attempt to set the sgid bit fails. On Unix filesystems,
* setting the sgid bit on a directory ensures that files and
* subdirectories created within inherit group ownership from the
* parent instead of from the primary gid.
*
* @since New in 1.1.
*/
svn_error_t *
svn_io_dir_make_sgid(const char *path,
apr_fileperms_t perm,
apr_pool_t *pool);
( run in 1.440 second using v1.01-cache-2.11-cpan-39bf76dae61 )