Alien-SVN
view release on metacpan or search on metacpan
src/subversion/subversion/include/svn_path.h view on Meta::CPAN
SVN_DEPRECATED
const char *
svn_path_is_child(const char *path1, const char *path2, apr_pool_t *pool);
/** Return TRUE if @a path1 is an ancestor of @a path2 or the paths are equal
* and FALSE otherwise.
*
* @since New in 1.3.
*
* @deprecated Provided for backward compatibility with the 1.6 API.
* For replacement functionality, see svn_dirent_skip_ancestor(),
* svn_uri_skip_ancestor(), and svn_relpath_skip_ancestor().
*/
SVN_DEPRECATED
svn_boolean_t
svn_path_is_ancestor(const char *path1, const char *path2);
/**
* Check whether @a path is a valid Subversion path.
*
* A valid Subversion pathname is a UTF-8 string without control
* characters. "Valid" means Subversion can store the pathname in
* a repository. There may be other, OS-specific, limitations on
* what paths can be represented in a working copy.
*
* ASSUMPTION: @a path is a valid UTF-8 string. This function does
* not check UTF-8 validity.
*
* Return @c SVN_NO_ERROR if valid and @c SVN_ERR_FS_PATH_SYNTAX if
* invalid.
*
* @note Despite returning an @c SVN_ERR_FS_* error, this function has
* nothing to do with the versioned filesystem's concept of validity.
*
* @since New in 1.2.
*/
svn_error_t *
svn_path_check_valid(const char *path, apr_pool_t *pool);
/** URI/URL stuff
*
* @defgroup svn_path_uri_stuff URI/URL conversion
* @{
*/
/** Return TRUE iff @a path looks like a valid absolute URL. */
svn_boolean_t
svn_path_is_url(const char *path);
/** Return @c TRUE iff @a path is URI-safe, @c FALSE otherwise. */
svn_boolean_t
svn_path_is_uri_safe(const char *path);
/** Return a URI-encoded copy of @a path, allocated in @a pool. (@a
path can be an arbitrary UTF-8 string and does not have to be a
canonical path.) */
const char *
svn_path_uri_encode(const char *path, apr_pool_t *pool);
/** Return a URI-decoded copy of @a path, allocated in @a pool. */
const char *
svn_path_uri_decode(const char *path, apr_pool_t *pool);
/** Extend @a url by @a component, URI-encoding that @a component
* before adding it to the @a url; return the new @a url, allocated in
* @a pool. If @a component is @c NULL, just return a copy of @a url,
* allocated in @a pool.
*
* @a component need not be a single path segment, but if it contains
* multiple segments, they must be separated by '/'. @a component
* should not begin with '/', however; if it does, the behavior is
* undefined.
*
* @a url must be in canonical format; it may not have a trailing '/'.
*
* @note To add a component that is already URI-encoded, use
* <tt>svn_path_join(url, component, pool)</tt> instead.
*
* @note gstein suggests this for when @a component begins with '/':
*
* "replace the path entirely
* https://example.com:4444/base/path joined with /leading/slash,
* should return: https://example.com:4444/leading/slash
* per the RFCs on combining URIs"
*
* We may implement that someday, which is why leading '/' is
* merely undefined right now.
*
* @since New in 1.6.
*/
const char *
svn_path_url_add_component2(const char *url,
const char *component,
apr_pool_t *pool);
/** Like svn_path_url_add_component2(), but allows path components that
* end with a trailing '/'
*
* @deprecated Provided for backward compatibility with the 1.5 API.
*/
SVN_DEPRECATED
const char *
svn_path_url_add_component(const char *url,
const char *component,
apr_pool_t *pool);
/**
* Convert @a iri (Internationalized URI) to an URI.
* The return value may be the same as @a iri if it was already
* a URI. Else, allocate the return value in @a pool.
*
* @since New in 1.1.
*/
const char *
svn_path_uri_from_iri(const char *iri, apr_pool_t *pool);
/**
* URI-encode certain characters in @a uri that are not valid in an URI, but
* doesn't have any special meaning in @a uri at their positions. If no
* characters need escaping, just return @a uri.
( run in 0.328 second using v1.01-cache-2.11-cpan-172d661cebc )