This document is for a version of USD that is under development. See this page for the current release.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
packageUtils.h
Go to the documentation of this file.
1//
2// Copyright 2018 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_USD_AR_PACKAGE_UTILS_H
8#define PXR_USD_AR_PACKAGE_UTILS_H
9
12
13#include "pxr/pxr.h"
14#include "pxr/usd/ar/api.h"
15
16#include <string>
17#include <vector>
18
19PXR_NAMESPACE_OPEN_SCOPE
20
21// --------------------------------------------------------------------- //
46// --------------------------------------------------------------------- //
47
49AR_API
50bool
51ArIsPackageRelativePath(const std::string& path);
52
66AR_API
67std::string
68ArJoinPackageRelativePath(const std::vector<std::string>& paths);
69
71AR_API
72std::string
73ArJoinPackageRelativePath(const std::pair<std::string, std::string>& paths);
74
76AR_API
77std::string
79 const std::string& packagePath, const std::string& packagedPath);
80
93AR_API
94std::pair<std::string, std::string>
95ArSplitPackageRelativePathOuter(const std::string& path);
96
109AR_API
110std::pair<std::string, std::string>
111ArSplitPackageRelativePathInner(const std::string& path);
112
114
115PXR_NAMESPACE_CLOSE_SCOPE
116
117#endif // PXR_USD_AR_PACKAGE_UTILS_H
AR_API std::pair< std::string, std::string > ArSplitPackageRelativePathOuter(const std::string &path)
Split package-relative path path into a (package path, packaged path) pair.
AR_API std::pair< std::string, std::string > ArSplitPackageRelativePathInner(const std::string &path)
Split package-relative path path into a (package path, packaged path) pair.
AR_API bool ArIsPackageRelativePath(const std::string &path)
Return true if path is a package-relative path, false otherwise.
AR_API std::string ArJoinPackageRelativePath(const std::vector< std::string > &paths)
Combines the given paths into a single package-relative path, nesting paths as necessary.