<commit_before>/**
 * @copyright
 * ====================================================================
 *    Licensed to the Apache Software Foundation (ASF) under one
 *    or more contributor license agreements.  See the NOTICE file
 *    distributed with this work for additional information
 *    regarding copyright ownership.  The ASF licenses this file
 *    to you under the Apache License, Version 2.0 (the
 *    "License"); you may not use this file except in compliance
 *    with the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing,
 *    software distributed under the License is distributed on an
 *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 *    KIND, either express or implied.  See the License for the
 *    specific language governing permissions and limitations
 *    under the License.
 * ====================================================================
 * @endcopyright
 *
 * @file svn_dirent_uri.h
 * @brief A library to manipulate URIs, relative paths and directory entries.
 *
 * This library makes a clear distinction between several path formats:
 *
 *  - a dirent is a path on (local) disc or a UNC path (Windows) in either
 *    relative or absolute format
 *    Examples: "/foo/bar", "X:/temp", "//server/share" and on Windows "A:/"
 *    But not: "http://server"
 *
 * - a URI, for our purposes, is just a URL -- a URI-encoded, absolute
 *    path that starts with a schema definition.
 *    Examples: "http://server", "svn+ssh://user@host:123/My%20Stuff/file.doc"
 *    But not: "file", "dir/file", "A:/dir", "/
 *    ### Currently the URI implementation still allows relative URIs
 *    ### as valid uris, but this will change soon.
 *
 *  - a relative path (relpath) is an unrooted path that can be joined to
 *    any other relative path, uri or dirent. A relative path is never
 *    rooted/prefixed by a '/'.
 *    Examples: "file", "dir/file", "dir/subdir/../file"
 *    But not: "/file", "http://server/file"
 *
 *  - a Subversion filesystem path (fspath), otherwise known as a path
 *    within a repository, is a path relative to the root of the repository
 *    filesystem, that starts with a slash ("/").  The rules for a fspath
 *    are the same as for a relpath except for the leading '/'.  A fspath
 *    never ends with '/' except when the whole path is just '/'.
 *
 *    The fspath API is private.
 *
 * This distinction is needed because on Windows we have to handle some
 * dirents and URIs differently. Since it's not possible to determine from
 * the path string if it's a dirent or a URI, it's up to the API user to
 * make this choice. See also issue #2028.
 *
 * All of these functions expect paths passed into them to be in canonical
 * form, except:
 *
 *    - @c svn_dirent_canonicalize()<commit_msg>* subversion/include/svn_dirent_uri.h   Rework the descriptive comment about our path types to better   explain what 'uri' is, and to generally improve readability of the   examples and non-examples.<commit_after>/**
 * @copyright
 * ====================================================================
 *    Licensed to the Apache Software Foundation (ASF) under one
 *    or more contributor license agreements.  See the NOTICE file
 *    distributed with this work for additional information
 *    regarding copyright ownership.  The ASF licenses this file
 *    to you under the Apache License, Version 2.0 (the
 *    "License"); you may not use this file except in compliance
 *    with the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing,
 *    software distributed under the License is distributed on an
 *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 *    KIND, either express or implied.  See the License for the
 *    specific language governing permissions and limitations
 *    under the License.
 * ====================================================================
 * @endcopyright
 *
 * @file svn_dirent_uri.h
 * @brief A library to manipulate URIs, relative paths and directory entries.
 *
 * This library makes a clear distinction between several path formats:
 *
 *  - a dirent is a path on (local) disc or a UNC path (Windows) in
 *    either relative or absolute format.
 *    Examples:
 *       "/foo/bar", "X:/temp", "//server/share", "A:/" (Windows only)
 *    But not:
 *       "http://server"
 *
 * - a uri, for our purposes, is a percent-encoded, absolute path
 *    (URI) that starts with a schema definition.  In practice, these
 *    tend to look like URLs, but never carry query strings.
 *    Examples:
 *       "http://server", "file:///path/to/repos",
 *       "svn+ssh://user@host:123/My%20Stuff/file.doc"
 *    But not:
 *       "file", "dir/file", "A:/dir", "/My%20Stuff/file.doc"
 *    ### Currently the uri implementation still allows relative URIs
 *    ### (carrying both relative and absolute path data) as valid
 *    ### uris, but this will change soon.
 *
 *  - a relative path (relpath) is an unrooted path that can be joined
 *    to any other relative path, uri or dirent. A relative path is
 *    never rooted/prefixed by a '/'.
 *    Examples:
 *       "file", "dir/file", "dir/subdir/../file"
 *    But not:
 *       "/file", "http://server/file"
 *
 *  - a Subversion filesystem path (fspath) -- otherwise known as a
 *    path within a repository -- is a path relative to the root of
 *    the repository filesystem, that starts with a slash ("/").  The
 *    rules for a fspath are the same as for a relpath except for the
 *    leading '/'.  A fspath never ends with '/' except when the whole
 *    path is just '/'.  ### NOTE:  The fspath API is private.
 *
 * This distinction is needed because on Windows we have to handle some
 * dirents and URIs differently. Since it's not possible to determine from
 * the path string if it's a dirent or a URI, it's up to the API user to
 * make this choice. See also issue #2028.
 *
 * All of these functions expect paths passed into them to be in canonical
 * form, except:
 *
 *    - @c svn_dirent_canonicalize()
{'fraction_non_alphanumeric': 0.13367444835305403, 'fraction_numerical': 0.004477134633834346, 'mean_word_length': 3.134170522141441, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6595379', 'n_tokens_mistral': 1730, 'n_tokens_neox': 1674, 'n_words': 790}