52 #include <apr_pools.h>
53 #include <apr_tables.h>
114 svn_path_join(
const char *base,
const char *component, apr_pool_t *pool);
184 const
char *path, apr_pool_t *pool);
244 const
char **dirpath,
245 const
char **base_name,
257 #ifndef SVN_DIRENT_URI_H
343 const char *relative,
359 const char **pdirectory,
401 apr_array_header_t **pcondensed_targets,
402 const apr_array_header_t *targets,
446 const apr_array_header_t *targets,
615 const char *component,
626 const char *component,
663 const char *path_utf8,
669 const char *path_apr,
717 const char *relative_url,
718 const char *repos_root_url,
const char * svn_path_canonicalize(const char *path, apr_pool_t *pool)
Return a new path (or URL) like path, but transformed such that some types of path specification redu...
svn_error_t * svn_path_cstring_from_utf8(const char **path_apr, const char *path_utf8, apr_pool_t *pool)
Convert path_utf8 from UTF-8 to the internal encoding used by APR.
Counted-length strings for Subversion, plus some C string goodies.
svn_boolean_t svn_path_is_backpath_present(const char *path)
Test to see if a backpath, i.e.
const char * svn_path_compose(const apr_array_header_t *components, apr_pool_t *pool)
Join an array of const char * components into a '/' separated path, allocated in pool.
const char * svn_path_uri_decode(const char *path, apr_pool_t *pool)
Return a URI-decoded copy of path, allocated in pool.
const char * svn_path_url_add_component(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 '/'...
const char * svn_path_internal_style(const char *path, apr_pool_t *pool)
Convert path from the local style to the canonical internal style.
char * svn_path_dirname(const char *path, apr_pool_t *pool)
Get the dirname of the specified canonicalized path, defined as the path with its basename removed...
svn_boolean_t svn_path_is_uri_safe(const char *path)
Return TRUE iff path is URI-safe, FALSE otherwise.
svn_error_t * svn_path_condense_targets(const char **pcommon, apr_array_header_t **pcondensed_targets, const apr_array_header_t *targets, svn_boolean_t remove_redundancies, apr_pool_t *pool)
Find the common prefix of the canonicalized paths in targets (an array of const char *'s)...
svn_boolean_t svn_path_is_canonical(const char *path, apr_pool_t *pool)
Return TRUE iff path is canonical.
int svn_path_compare_paths(const char *path1, const char *path2)
Return an integer greater than, equal to, or less than 0, according as path1 is greater than...
char * svn_path_join(const char *base, const char *component, apr_pool_t *pool)
Join a base path (base) with a component (component), allocating the result in pool.
svn_boolean_t svn_path_is_repos_relative_url(const char *path)
Return TRUE iff path is a repository-relative URL: specifically that it starts with the characters "^...
void svn_path_remove_component(svn_stringbuf_t *path)
Remove one component off the end of the canonicalized path.
char * svn_path_basename(const char *path, apr_pool_t *pool)
Get the basename of the specified canonicalized path.
svn_error_t * svn_path_cstring_to_utf8(const char **path_utf8, const char *path_apr, apr_pool_t *pool)
Convert path_apr from the internal encoding used by APR to UTF-8.
void svn_path_remove_components(svn_stringbuf_t *path, apr_size_t n)
Remove n components off the end of the canonicalized path.
const char * svn_path_illegal_path_escape(const char *path, apr_pool_t *pool)
Return a copy of path, allocated from pool, for which control characters have been escaped using the ...
svn_boolean_t svn_dirent_is_root(const char *dirent, apr_size_t len)
Return TRUE if dirent is considered a root directory on the platform at hand.
svn_error_t * svn_path_get_absolute(const char **pabsolute, const char *relative, apr_pool_t *pool)
Convert relative canonicalized path to an absolute path and return the results in *pabsolute...
A library to manipulate URIs, relative paths and directory entries.
const char * svn_path_uri_encode(const char *path, apr_pool_t *pool)
Return a URI-encoded copy of path, allocated in pool.
const char * svn_path_is_child(const char *path1, const char *path2, apr_pool_t *pool)
Test if path2 is a child of path1.
Subversion's data types.
svn_error_t * svn_path_check_valid(const char *path, apr_pool_t *pool)
Check whether path is a valid Subversion path.
apr_array_header_t * svn_path_decompose(const char *path, apr_pool_t *pool)
Decompose the canonicalized path into an array of const char * components, allocated in pool...
#define SVN_DEPRECATED
Macro used to mark deprecated functions.
svn_boolean_t svn_path_is_url(const char *path)
Return TRUE iff path looks like a valid absolute URL.
void svn_path_split(const char *path, const char **dirpath, const char **base_name, apr_pool_t *pool)
Divide the canonicalized path into *dirpath and *base_name, allocated in pool.
svn_error_t * svn_path_split_if_file(const char *path, const char **pdirectory, const char **pfile, apr_pool_t *pool)
Return the path part of the canonicalized path in *pdirectory, and the file part in *pfile...
const char * svn_path_uri_autoescape(const char *uri, apr_pool_t *pool)
URI-encode certain characters in uri that are not valid in an URI, but doesn't have any special meani...
const char * svn_path_url_add_component2(const char *url, const char *component, apr_pool_t *pool)
Extend url by component, URI-encoding that component before adding it to the url; return the new url...
svn_boolean_t svn_path_is_dotpath_present(const char *path)
Test to see if a dotpath, i.e.
const char * svn_path_local_style(const char *path, apr_pool_t *pool)
Convert path from the canonical internal style to the local style.
int svn_path_is_empty(const char *path)
Return non-zero iff path is empty ("") or represents the current directory – that is...
svn_error_t * svn_path_remove_redundancies(apr_array_header_t **pcondensed_targets, const apr_array_header_t *targets, apr_pool_t *pool)
Copy a list of canonicalized targets, one at a time, into pcondensed_targets, omitting any targets th...
svn_boolean_t svn_path_is_single_path_component(const char *name)
Test that name is a single path component, that is:
int svn_boolean_t
YABT: Yet Another Boolean Type.
apr_size_t svn_path_component_count(const char *path)
Return the number of components in the canonicalized path.
#define SVN_NEEDS_SENTINEL_NULL
Macro used to mark functions that require a final null sentinel argument.
svn_error_t * svn_path_resolve_repos_relative_url(const char **absolute_url, const char *relative_url, const char *repos_root_url, apr_pool_t *pool)
Set absolute_url to the absolute URL represented by relative_url relative to repos_root_url, preserving any peg revision specifier present in relative_url.
void svn_path_splitext(const char **path_root, const char **path_ext, const char *path, apr_pool_t *pool)
Split path into a root portion and an extension such that the root + the extension = the original pat...
char * svn_path_get_longest_ancestor(const char *path1, const char *path2, apr_pool_t *pool)
Return the longest common path shared by two canonicalized paths, path1 and path2.
const char * svn_path_uri_from_iri(const char *iri, apr_pool_t *pool)
Convert iri (Internationalized URI) to an URI.
A buffered string, capable of appending without an allocation and copy for each append.
void svn_path_add_component(svn_stringbuf_t *path, const char *component)
Add a component (a NULL-terminated C-string) to the canonicalized path.
char * svn_path_join_many(apr_pool_t *pool, const char *base,...)
Join multiple components onto a base path, allocated in pool.
svn_boolean_t svn_path_is_ancestor(const char *path1, const char *path2)
Return TRUE if path1 is an ancestor of path2 or the paths are equal and FALSE otherwise.