Loading...
Searching...
No Matches
pathUtils.h
Go to the documentation of this file.
1//
2// Copyright 2016 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_BASE_TF_PATH_UTILS_H
8#define PXR_BASE_TF_PATH_UTILS_H
9
10#include "pxr/pxr.h"
11#include "pxr/base/tf/api.h"
13#include <string>
14#include <vector>
15
16PXR_NAMESPACE_OPEN_SCOPE
17
24
40TF_API
41std::string TfRealPath(std::string const& path,
42 bool allowInaccessibleSuffix = false,
43 std::string* error = 0);
44
55TF_API
56std::string TfNormPath(std::string const& path,
57 bool stripDriveSpecifier = false);
58
77TF_API
78std::string::size_type
79TfFindLongestAccessiblePrefix(std::string const &path, std::string* error = 0);
80
88TF_API
89std::string TfAbsPath(std::string const& path);
90
105TF_API
106std::string TfGetExtension(std::string const& path);
107
110TF_API
111std::string TfReadLink(std::string const& path);
112
114TF_API
115bool TfIsRelativePath(std::string const& path);
116
124TF_API
125std::vector<std::string> TfGlob(std::vector<std::string> const& paths,
126 unsigned int flags=ARCH_GLOB_DEFAULT);
127
134TF_API
135std::vector<std::string> TfGlob(std::string const& path,
136 unsigned int flags=ARCH_GLOB_DEFAULT);
137
138PXR_NAMESPACE_CLOSE_SCOPE
139
140#endif /* PXR_BASE_TF_PATH_UTILS_H */
Architecture dependent file system access.
TF_API std::string TfAbsPath(std::string const &path)
Returns the canonical absolute path of the specified filename.
TF_API std::string::size_type TfFindLongestAccessiblePrefix(std::string const &path, std::string *error=0)
Return the index delimiting the longest accessible prefix of path.
TF_API std::string TfReadLink(std::string const &path)
Returns the value of a symbolic link.
TF_API std::string TfNormPath(std::string const &path, bool stripDriveSpecifier=false)
Normalizes the specified path, eliminating double slashes, etc.
TF_API bool TfIsRelativePath(std::string const &path)
Return true if and only if a path is relative (not absolute).
TF_API std::vector< std::string > TfGlob(std::vector< std::string > const &paths, unsigned int flags=ARCH_GLOB_DEFAULT)
Expands one or more shell glob patterns.
TF_API std::string TfGetExtension(std::string const &path)
Returns the extension for a file path.
TF_API std::string TfRealPath(std::string const &path, bool allowInaccessibleSuffix=false, std::string *error=0)
Returns the canonical path of the specified filename, eliminating any symbolic links encountered in t...