3
3
* ====================================================================
4
* Copyright (c) 2000-2004 CollabNet. All rights reserved.
6
* This software is licensed as described in the file COPYING, which
7
* you should have received as part of this distribution. The terms
8
* are also available at http://subversion.tigris.org/license-1.html.
9
* If newer versions of this license are posted there, you may use a
10
* newer version instead, at your option.
12
* This software consists of voluntary contributions made by many
13
* individuals. For exact contribution history, see the revision
14
* history and logs, available at http://subversion.tigris.org/.
4
* Licensed to the Apache Software Foundation (ASF) under one
5
* or more contributor license agreements. See the NOTICE file
6
* distributed with this work for additional information
7
* regarding copyright ownership. The ASF licenses this file
8
* to you under the Apache License, Version 2.0 (the
9
* "License"); you may not use this file except in compliance
10
* with the License. You may obtain a copy of the License at
12
* http://www.apache.org/licenses/LICENSE-2.0
14
* Unless required by applicable law or agreed to in writing,
15
* software distributed under the License is distributed on an
16
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17
* KIND, either express or implied. See the License for the
18
* specific language governing permissions and limitations
15
20
* ====================================================================
60
/** Convert @a path from the local style to the canonical internal style. */
66
/** Convert @a path from the local style to the canonical internal style.
68
* @deprecated Provided for backward compatibility with the 1.6 API.
69
* New code should use svn_dirent_internal_style().
62
73
svn_path_internal_style(const char *path, apr_pool_t *pool);
64
/** Convert @a path from the canonical internal style to the local style. */
75
/** Convert @a path from the canonical internal style to the local style.
77
* @deprecated Provided for backward compatibility with the 1.6 API.
78
* New code should use svn_dirent_local_style().
66
82
svn_path_local_style(const char *path, apr_pool_t *pool);
88
104
* based on a leading '/' character. Thus, an "absolute URI" for the
89
105
* @a component won't be detected. An absolute URI can only be used
108
* @deprecated Provided for backward compatibility with the 1.6 API.
109
* New code should use svn_dirent_join(), svn_uri_join(),
110
* svn_relpath_join() or svn_fspath__join().
93
114
svn_path_join(const char *base, const char *component, apr_pool_t *pool);
103
124
* This function does not support URLs.
105
126
* See svn_path_join() for further notes about joining paths.
128
* @deprecated Provided for backward compatibility with the 1.6 API.
129
* For new code, consider using svn_dirent_join_many() or a sequence of
130
* calls to one of the *_join() functions.
108
134
svn_path_join_many(apr_pool_t *pool, const char *base, ...);
119
145
* The returned basename will be allocated in @a pool.
121
147
* @note If an empty string is passed, then an empty string will be returned.
149
* @deprecated Provided for backward compatibility with the 1.6 API.
150
* New code should use svn_dirent_basename(), svn_uri_basename(),
151
* svn_relpath_basename() or svn_fspath__basename().
124
155
svn_path_basename(const char *path, apr_pool_t *pool);
128
159
* returned unchanged.
130
161
* The returned dirname will be allocated in @a pool.
163
* @deprecated Provided for backward compatibility with the 1.6 API.
164
* New code should use svn_dirent_dirname(), svn_uri_dirname(),
165
* svn_relpath_dirname() or svn_fspath__dirname().
133
169
svn_path_dirname(const char *path, apr_pool_t *pool);
195
231
* - <pre>"X:/" ==> "X:/" and "X:/"</pre>
196
232
* - <pre>"bar" ==> "" and "bar"</pre>
197
233
* - <pre>"" ==> "" and ""</pre>
235
* @deprecated Provided for backward compatibility with the 1.6 API.
236
* New code should use svn_dirent_split(), svn_uri_split(),
237
* svn_relpath_split() or svn_fspath__split().
200
241
svn_path_split(const char *path,
201
242
const char **dirpath,
211
252
svn_path_is_empty(const char *path);
213
255
#ifndef SVN_DIRENT_URI_H
214
/* This declaration has been moved to svn_dirent_uri.h, remains here only for
215
compatiblity reasons. */
256
/* This declaration has been moved to svn_dirent_uri.h, and remains
257
here only for compatibility reasons. */
217
259
svn_dirent_is_root(const char *dirent, apr_size_t len);
218
260
#endif /* SVN_DIRENT_URI_H */
220
263
/** Return a new path (or URL) like @a path, but transformed such that
221
264
* some types of path specification redundancies are removed.
230
273
* The returned path may be statically allocated, equal to @a path, or
231
274
* allocated from @a pool.
276
* @deprecated Provided for backward compatibility with the 1.6 API.
277
* New code should use svn_dirent_canonicalize(), svn_uri_canonicalize(),
278
* svn_relpath_canonicalize() or svn_fspath__canonicalize().
234
282
svn_path_canonicalize(const char *path, apr_pool_t *pool);
239
287
* @since New in 1.5.
288
* @deprecated Provided for backward compatibility with the 1.6 API.
289
* New code should use svn_dirent_is_canonical(), svn_uri_is_canonical(),
290
* svn_relpath_is_canonical() or svn_fspath__is_canonical().
242
294
svn_path_is_canonical(const char *path, apr_pool_t *pool);
258
310
* with the same path but different protocols may point at completely
259
311
* different resources), and (b) share a common ancestor in their path
260
312
* component, i.e. 'protocol://' is not a sufficient ancestor.
314
* @deprecated Provided for backward compatibility with the 1.6 API.
315
* New code should use svn_dirent_get_longest_ancestor(),
316
* svn_uri_get_longest_ancestor(), svn_relpath_get_longest_ancestor() or
317
* svn_fspath__get_longest_ancestor().
263
321
svn_path_get_longest_ancestor(const char *path1,
264
322
const char *path2,
270
328
* @a relative may be a URL, in which case no attempt is made to convert it,
271
329
* and a copy of the URL is returned.
331
* @deprecated Provided for backward compatibility with the 1.6 API.
332
* New code should use svn_dirent_get_absolute() on a non-URL input.
274
336
svn_path_get_absolute(const char **pabsolute,
275
337
const char *relative,
280
342
* directory, set @a *pdirectory to @a path, and @a *pfile to the
281
343
* empty string. If @a path does not exist it is treated as if it is
282
344
* a file, since directories do not normally vanish.
346
* @deprecated Provided for backward compatibility with the 1.6 API.
347
* New code should implement the required logic directly; no direct
348
* replacement is provided.
285
352
svn_path_split_if_file(const char *path,
286
353
const char **pdirectory,
316
383
* applicable) @a *pcondensed_targets to @c NULL.
318
385
* @note There is no guarantee that @a *pcommon is within a working
388
* @deprecated Provided for backward compatibility with the 1.6 API.
389
* New code should use svn_dirent_condense_targets() or
390
* svn_uri_condense_targets().
321
394
svn_path_condense_targets(const char **pcommon,
322
395
apr_array_header_t **pcondensed_targets,
435
508
* in which case a pointer into @a path2 will be returned to
436
509
* identify the remainder path.
438
* ### @todo the ".." restriction is unfortunate, and would ideally
439
* be lifted by making the implementation smarter. But this is not
440
* trivial: if the path is "../foo", how do you know whether or not
441
* the current directory is named "foo" in its parent?
511
* @deprecated Provided for backward compatibility with the 1.6 API.
512
* New code should use svn_dirent_is_child(), svn_uri_is_child(),
513
* svn_relpath_is_child() or svn_fspath__is_child().
444
517
svn_path_is_child(const char *path1, const char *path2, apr_pool_t *pool);
447
520
* and FALSE otherwise.
449
522
* @since New in 1.3.
524
* @deprecated Provided for backward compatibility with the 1.6 API.
525
* New code should use svn_dirent_is_ancestor(), svn_uri_is_ancestor(),
526
* svn_relpath_is_ancestor() or svn_fspath__is_ancestor().
452
530
svn_path_is_ancestor(const char *path1, const char *path2);
530
608
const char *component,
531
609
apr_pool_t *pool);
533
/** Like svn_path_url_add_component2, but allows path components that
611
/** Like svn_path_url_add_component2(), but allows path components that
534
612
* end with a trailing '/'
536
614
* @deprecated Provided for backward compatibility with the 1.5 API.