Alien-SVN

 view release on metacpan or  search on metacpan

src/subversion/subversion/include/private/svn_fspath.h  view on Meta::CPAN

 *
 * Either @a dirpath or @a base_name may be @a fspath's own address, but they
 * may not both be the same address, or the results are undefined.
 *
 * If @a fspath has two or more components, the separator between @a dirpath
 * and @a base_name is not included in either of the new names.
 *
 * @since New in 1.7.
 */
void
svn_fspath__split(const char **dirpath,
                  const char **base_name,
                  const char *fspath,
                  apr_pool_t *result_pool);

/** Return the fspath composed of @a fspath with @a relpath appended.
 * Allocate the result in @a result_pool.
 *
 * @since New in 1.7.
 */
char *
svn_fspath__join(const char *fspath,
                 const char *relpath,
                 apr_pool_t *result_pool);


/** Return TRUE if @a fspath (with length @a len) is the root
 * directory; return FALSE otherwise.
 *
 * @since New in 1.7.
 */
svn_boolean_t
svn_fspath__is_root(const char *fspath,
                    apr_size_t len);

/** Return the relative path part of @a child_fspath that is below
 * @a parent_fspath, or just "" if @a parent_fspath is equal to
 * @a child_fspath. If @a child_fspath is not below @a parent_fspath
 * or equal to it, return @c NULL.
 *
 * @since New in 1.7.
 */
const char *
svn_fspath__skip_ancestor(const char *parent_fspath,
                          const char *child_fspath);

/** Return the longest common path shared by two fspaths, @a fspath1 and
 * @a fspath2.  If there's no common ancestor, return "/".
 *
 * @since New in 1.7.
 */
char *
svn_fspath__get_longest_ancestor(const char *fspath1,
                                 const char *fspath2,
                                 apr_pool_t *result_pool);




/** A faux fspath API used by the DAV modules to help us distinguish
 * between real URI-decoded fspaths and URI-encoded URL path-portions.
 */
#define svn_urlpath__basename             svn_fspath__basename
#define svn_urlpath__dirname              svn_fspath__dirname
#define svn_urlpath__get_longest_ancestor svn_fspath__get_longest_ancestor
#define svn_urlpath__is_canonical         svn_fspath__is_canonical
#define svn_urlpath__is_root              svn_fspath__is_root
#define svn_urlpath__join                 svn_fspath__join
#define svn_urlpath__skip_ancestor        svn_fspath__skip_ancestor
#define svn_urlpath__split                svn_fspath__split

/* Like svn_fspath__canonicalize(), but this one accepts both full
   URLs and URL path-portions. */
const char *
svn_urlpath__canonicalize(const char *uri, apr_pool_t *pool);


#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* SVN_FSPATH_H */



( run in 0.379 second using v1.01-cache-2.11-cpan-d59ab9ce9b0 )