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 
19 PXR_NAMESPACE_OPEN_SCOPE
20 
21 // --------------------------------------------------------------------- //
46 // --------------------------------------------------------------------- //
47 
49 AR_API
50 bool
51 ArIsPackageRelativePath(const std::string& path);
52 
66 AR_API
67 std::string
68 ArJoinPackageRelativePath(const std::vector<std::string>& paths);
69 
71 AR_API
72 std::string
73 ArJoinPackageRelativePath(const std::pair<std::string, std::string>& paths);
74 
76 AR_API
77 std::string
79  const std::string& packagePath, const std::string& packagedPath);
80 
93 AR_API
94 std::pair<std::string, std::string>
95 ArSplitPackageRelativePathOuter(const std::string& path);
96 
109 AR_API
110 std::pair<std::string, std::string>
111 ArSplitPackageRelativePathInner(const std::string& path);
112 
114 
115 PXR_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 std::string ArJoinPackageRelativePath(const std::vector< std::string > &paths)
Combines the given paths into a single package-relative path, nesting paths as necessary.
AR_API bool ArIsPackageRelativePath(const std::string &path)
Return true if path is a package-relative path, false otherwise.