Files
test2/source/blender/asset_system/intern/utils.hh
Campbell Barton e955c94ed3 License Headers: Set copyright to "Blender Authors", add AUTHORS
Listing the "Blender Foundation" as copyright holder implied the Blender
Foundation holds copyright to files which may include work from many
developers.

While keeping copyright on headers makes sense for isolated libraries,
Blender's own code may be refactored or moved between files in a way
that makes the per file copyright holders less meaningful.

Copyright references to the "Blender Foundation" have been replaced with
"Blender Authors", with the exception of `./extern/` since these this
contains libraries which are more isolated, any changed to license
headers there can be handled on a case-by-case basis.

Some directories in `./intern/` have also been excluded:

- `./intern/cycles/` it's own `AUTHORS` file is planned.
- `./intern/opensubdiv/`.

An "AUTHORS" file has been added, using the chromium projects authors
file as a template.

Design task: #110784

Ref !110783.
2023-08-16 00:20:26 +10:00

32 lines
988 B
C++

/* SPDX-FileCopyrightText: 2023 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
/** \file
* \ingroup asset_system
*/
#pragma once
#include "BLI_string_ref.hh"
namespace blender::asset_system::utils {
/**
* Returns a normalized directory path with a trailing slash, and a maximum length of #PATH_MAX.
* Slashes are not converted to native format (they probably should be though?).
*/
std::string normalize_directory_path(StringRef directory);
/**
* Normalize the given `path` (remove 'parent directory' and double-slashes element etc., and
* convert to native path separators).
*
* If \a max_len is not #StringRef::not_found (default value), only the first part of the given
* string up to the given length is processed, the rest remains unchanged. Needed to avoid
* modifying ID name part of linked library paths.
*/
std::string normalize_path(StringRefNull path, int64_t max_len = StringRef::not_found);
} // namespace blender::asset_system::utils