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
41TF_API
42std::string TfRealPath(std::string const& path,
43 bool allowInaccessibleSuffix = false,
44 std::string* error = 0);
45
56TF_API
57std::string TfNormPath(std::string const& path,
58 bool stripDriveSpecifier = false);
59
78TF_API
79std::string::size_type
80TfFindLongestAccessiblePrefix(std::string const &path, std::string* error = 0);
81
89TF_API
90std::string TfAbsPath(std::string const& path);
91
106TF_API
107std::string TfGetExtension(std::string const& path);
108
111TF_API
112std::string TfReadLink(std::string const& path);
113
115TF_API
116bool TfIsRelativePath(std::string const& path);
117
125TF_API
126std::vector<std::string> TfGlob(std::vector<std::string> const& paths,
127 unsigned int flags=ARCH_GLOB_DEFAULT);
128
135TF_API
136std::vector<std::string> TfGlob(std::string const& path,
137 unsigned int flags=ARCH_GLOB_DEFAULT);
138
139PXR_NAMESPACE_CLOSE_SCOPE
140
141#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...