GME  13
svn_path.h
Go to the documentation of this file.
00001 
00048 #ifndef SVN_PATH_H
00049 #define SVN_PATH_H
00050 
00051 #include <apr.h>
00052 #include <apr_pools.h>
00053 #include <apr_tables.h>
00054 
00055 #include "svn_types.h"
00056 #include "svn_string.h"
00057 #include "svn_dirent_uri.h"
00058 
00059 
00060 #ifdef __cplusplus
00061 extern "C" {
00062 #endif /* __cplusplus */
00063 
00064 
00065 
00071 SVN_DEPRECATED
00072 const char *
00073 svn_path_internal_style(const char *path, apr_pool_t *pool);
00074 
00080 SVN_DEPRECATED
00081 const char *
00082 svn_path_local_style(const char *path, apr_pool_t *pool);
00083 
00084 
00112 SVN_DEPRECATED
00113 char *
00114 svn_path_join(const char *base, const char *component, apr_pool_t *pool);
00115 
00132 SVN_DEPRECATED
00133 char *
00134 svn_path_join_many(apr_pool_t *pool, const char *base, ...);
00135 
00136 
00153 SVN_DEPRECATED
00154 char *
00155 svn_path_basename(const char *path, apr_pool_t *pool);
00156 
00167 SVN_DEPRECATED
00168 char *
00169 svn_path_dirname(const char *path, apr_pool_t *pool);
00170 
00180 void
00181 svn_path_splitext(const char **path_root, const char **path_ext,
00182                   const char *path, apr_pool_t *pool);
00183 
00188 apr_size_t
00189 svn_path_component_count(const char *path);
00190 
00201 void
00202 svn_path_add_component(svn_stringbuf_t *path, const char *component);
00203 
00205 void
00206 svn_path_remove_component(svn_stringbuf_t *path);
00207 
00213 void
00214 svn_path_remove_components(svn_stringbuf_t *path, apr_size_t n);
00215 
00239 SVN_DEPRECATED
00240 void
00241 svn_path_split(const char *path,
00242                const char **dirpath,
00243                const char **base_name,
00244                apr_pool_t *pool);
00245 
00246 
00251 int
00252 svn_path_is_empty(const char *path);
00253 
00254 
00255 #ifndef SVN_DIRENT_URI_H
00256 /* This declaration has been moved to svn_dirent_uri.h, and remains
00257    here only for compatibility reasons. */
00258 svn_boolean_t
00259 svn_dirent_is_root(const char *dirent, apr_size_t len);
00260 #endif /* SVN_DIRENT_URI_H */
00261 
00262 
00280 SVN_DEPRECATED
00281 const char *
00282 svn_path_canonicalize(const char *path, apr_pool_t *pool);
00283 
00292 SVN_DEPRECATED
00293 svn_boolean_t
00294 svn_path_is_canonical(const char *path, apr_pool_t *pool);
00295 
00296 
00304 int
00305 svn_path_compare_paths(const char *path1, const char *path2);
00306 
00307 
00323 SVN_DEPRECATED
00324 char *
00325 svn_path_get_longest_ancestor(const char *path1,
00326                               const char *path2,
00327                               apr_pool_t *pool);
00328 
00338 SVN_DEPRECATED
00339 svn_error_t *
00340 svn_path_get_absolute(const char **pabsolute,
00341                       const char *relative,
00342                       apr_pool_t *pool);
00343 
00354 SVN_DEPRECATED
00355 svn_error_t *
00356 svn_path_split_if_file(const char *path,
00357                        const char **pdirectory,
00358                        const char **pfile,
00359                        apr_pool_t *pool);
00360 
00396 SVN_DEPRECATED
00397 svn_error_t *
00398 svn_path_condense_targets(const char **pcommon,
00399                           apr_array_header_t **pcondensed_targets,
00400                           const apr_array_header_t *targets,
00401                           svn_boolean_t remove_redundancies,
00402                           apr_pool_t *pool);
00403 
00404 
00442 svn_error_t *
00443 svn_path_remove_redundancies(apr_array_header_t **pcondensed_targets,
00444                              const apr_array_header_t *targets,
00445                              apr_pool_t *pool);
00446 
00447 
00453 apr_array_header_t *
00454 svn_path_decompose(const char *path, apr_pool_t *pool);
00455 
00465 const char *
00466 svn_path_compose(const apr_array_header_t *components, apr_pool_t *pool);
00467 
00473 svn_boolean_t
00474 svn_path_is_single_path_component(const char *name);
00475 
00476 
00484 svn_boolean_t
00485 svn_path_is_backpath_present(const char *path);
00486 
00487 
00495 svn_boolean_t
00496 svn_path_is_dotpath_present(const char *path);
00497 
00498 
00520 SVN_DEPRECATED
00521 const char *
00522 svn_path_is_child(const char *path1, const char *path2, apr_pool_t *pool);
00523 
00533 SVN_DEPRECATED
00534 svn_boolean_t
00535 svn_path_is_ancestor(const char *path1, const char *path2);
00536 
00556 svn_error_t *
00557 svn_path_check_valid(const char *path, apr_pool_t *pool);
00558 
00559 
00567 svn_boolean_t
00568 svn_path_is_url(const char *path);
00569 
00571 svn_boolean_t
00572 svn_path_is_uri_safe(const char *path);
00573 
00577 const char *
00578 svn_path_uri_encode(const char *path, apr_pool_t *pool);
00579 
00581 const char *
00582 svn_path_uri_decode(const char *path, apr_pool_t *pool);
00583 
00611 const char *
00612 svn_path_url_add_component2(const char *url,
00613                             const char *component,
00614                             apr_pool_t *pool);
00615 
00621 SVN_DEPRECATED
00622 const char *
00623 svn_path_url_add_component(const char *url,
00624                            const char *component,
00625                            apr_pool_t *pool);
00626 
00634 const char *
00635 svn_path_uri_from_iri(const char *iri, apr_pool_t *pool);
00636 
00647 const char *
00648 svn_path_uri_autoescape(const char *uri, apr_pool_t *pool);
00649 
00659 svn_error_t *
00660 svn_path_cstring_from_utf8(const char **path_apr,
00661                            const char *path_utf8,
00662                            apr_pool_t *pool);
00663 
00665 svn_error_t *
00666 svn_path_cstring_to_utf8(const char **path_utf8,
00667                          const char *path_apr,
00668                          apr_pool_t *pool);
00669 
00670 
00673 
00691 svn_boolean_t
00692 svn_path_is_repos_relative_url(const char *path);
00693 
00713 svn_error_t *
00714 svn_path_resolve_repos_relative_url(const char **absolute_url,
00715                                     const char *relative_url,
00716                                     const char *repos_root_url,
00717                                     apr_pool_t *pool);
00718 
00719 /* Return a copy of @a path, allocated from @a pool, for which control
00720  * characters have been escaped using the form \NNN (where NNN is the
00721  * octal representation of the byte's ordinal value).
00722  * 
00723  * @since New in 1.8. */
00724 const char *
00725 svn_path_illegal_path_escape(const char *path, apr_pool_t *pool);
00726 
00729 #ifdef __cplusplus
00730 }
00731 #endif /* __cplusplus */
00732 
00733 
00734 #endif /* SVN_PATH_H */