Alien-SVN
view release on metacpan or search on metacpan
src/subversion/subversion/include/svn_io.h view on Meta::CPAN
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);
/** Create directory @a path on the file system, creating intermediate
* directories as required, like <tt>mkdir -p</tt>. Report no error if @a
* path already exists. @a path is utf8-encoded.
*
* This is essentially a wrapper for apr_dir_make_recursive(), passing
* @c APR_OS_DEFAULT as the permissions.
*/
svn_error_t *
svn_io_make_dir_recursively(const char *path,
apr_pool_t *pool);
/** Set @a *is_empty_p to @c TRUE if directory @a path is empty, else to
* @c FALSE if it is not empty. @a path must be a directory, and is
* utf8-encoded. Use @a pool for temporary allocation.
*/
svn_error_t *
svn_io_dir_empty(svn_boolean_t *is_empty_p,
const char *path,
apr_pool_t *pool);
/** Append @a src to @a dst. @a dst will be appended to if it exists, else it
* will be created. Both @a src and @a dst are utf8-encoded.
*/
svn_error_t *
svn_io_append_file(const char *src,
const char *dst,
apr_pool_t *pool);
/** Make a file as read-only as the operating system allows.
* @a path is the utf8-encoded path to the file. If @a ignore_enoent is
* @c TRUE, don't fail if the target file doesn't exist.
*
* If @a path is a symlink, do nothing.
*
* @note If @a path is a directory, act on it as though it were a
* file, as described above, but note that you probably don't want to
* call this function on directories. We have left it effective on
* directories for compatibility reasons, but as its name implies, it
* should be used only for files.
*/
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 writable as the operating system allows.
* @a path is the utf8-encoded path to the file. If @a ignore_enoent is
* @c TRUE, don't fail if the target file doesn't exist.
* @warning On Unix this function will do the equivalent of chmod a+w path.
* If this is not what you want you should not use this function, but rather
* use apr_file_perms_set().
*
* If @a path is a symlink, do nothing.
*
* @note If @a path is a directory, act on it as though it were a
* file, as described above, but note that you probably don't want to
* call this function on directories. We have left it effective on
* directories for compatibility reasons, but as its name implies, it
* should be used only for files.
*/
svn_error_t *
svn_io_set_file_read_write(const char *path,
svn_boolean_t ignore_enoent,
apr_pool_t *pool);
/** Similar to svn_io_set_file_read_* functions.
* Change the read-write permissions of a file.
* @since New in 1.1.
*
* When making @a path read-write on operating systems with unix style
* permissions, set the permissions on @a path to the permissions that
* are set when a new file is created (effectively honoring the user's
* umask).
*
* When making the file read-only on operating systems with unix style
* permissions, remove all write permissions.
*
* On other operating systems, toggle the file's "writability" as much as
* the operating system allows.
*
* @a path is the utf8-encoded path to the file. If @a enable_write
* is @c TRUE, then make the file read-write. If @c FALSE, make it
* read-only. If @a ignore_enoent is @c TRUE, don't fail if the target
* file doesn't exist.
*
* @deprecated Provided for backward compatibility with the 1.3 API.
*/
SVN_DEPRECATED
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);
/** Set @a path's "executability" (but do nothing if it is a symlink).
*
* @a path is the utf8-encoded path to the file. If @a executable
* is @c TRUE, then make the file executable. If @c FALSE, make it
* non-executable. If @a ignore_enoent is @c TRUE, don't fail if the target
* file doesn't exist.
*
* When making the file executable on operating systems with unix style
* permissions, never add an execute permission where there is not
* already a read permission: that is, only make the file executable
* for the user, group or world if the corresponding read permission
* is already set for user, group or world.
*
* When making the file non-executable on operating systems with unix style
( run in 0.882 second using v1.01-cache-2.11-cpan-9288abcf80b )