Bifrost SDK
Bifrost SDK documentation
FileUtils.h
Go to the documentation of this file.
1//-
2// =============================================================================
3// Copyright 2025 Autodesk, Inc. All rights reserved.
4//
5// Use of this software is subject to the terms of the Autodesk license
6// agreement provided at the time of installation or download, or which
7// otherwise accompanies this software in either electronic or hard copy form.
8// =============================================================================
9//+
10
11//
16
17#ifndef BIFROST_FILE_UTILS_H
18#define BIFROST_FILE_UTILS_H
19
20#include "FileUtilsExport.h"
21
22#include <Amino/Core/String.h>
24
25namespace Bifrost {
26
27namespace FileUtils {
28
32
38
46 Amino::String* errorMessage = nullptr);
47
59
76
84
91
102 long long frame,
103 Amino::StringView targetExtension);
104
120
127 Amino::String* out_errorMessage = nullptr);
128
138 Amino::StringView baseDirectory);
139
148FILE_UTILS_DECL bool exists(Amino::StringView path, Amino::String* errorMessage = nullptr);
149
156 Amino::String* errorMessage = nullptr);
157
169FILE_UTILS_DECL bool removeAll(Amino::StringView path, Amino::String* errorMessage = nullptr);
170
172} // namespace FileUtils
173} // namespace Bifrost
174
175#endif // BIFROST_FILE_UTILS_H
String class.
String view class (similar to std::string_view)
Definition of macros for symbol visibility.
#define FILE_UTILS_DECL
Amino::String filename(Amino::StringView baseName, long long frame, Amino::StringView targetExtension)
Construct a file name with the specified frame number and extension. If the file name contains # or @...
bool isAbsolute(Amino::StringView path)
Checks if a path is absolute.
bool currentPath(Amino::String &currentPath, Amino::String *errorMessage=nullptr)
Returns the current path.
Amino::String makePreferred(Amino::StringView path)
Convert directory separator characters in the given string to the operating system's preferred charac...
bool createDirectories(Amino::StringView path, Amino::String *errorMessage=nullptr)
Creates the directories in path that do not exist.
Amino::String getRelativePath(Amino::StringView path, Amino::StringView baseDirectory)
Return the valid relative path of the input path with respect to baseDirectory.
bool exists(Amino::StringView path, Amino::String *errorMessage=nullptr)
Verify if a path exists.
bool tempDirectoryPath(Amino::String &tempDirectoryPath, Amino::String *errorMessage=nullptr)
Returns the directory location suitable for temporary files.
Amino::String extractFilename(Amino::StringView filePath)
Get the filename (with extension) from a file path. The input is first processed by makePreferred....
Amino::String filePath(Amino::StringView directory, Amino::StringView filename)
Create a file path from a directory and an filename in an operating system / independent way.
bool removeAll(Amino::StringView path, Amino::String *errorMessage=nullptr)
Amino::String extractParentPath(Amino::StringView path)
Returns the parent path of path. The input is first processed by makePreferred. Then the extraction f...
bool filePathExists(Amino::StringView filePath, Amino::String *out_errorMessage=nullptr)
Verify if a file path exists.
Definition: FCurve.h:35
The string class used by Amino.
Definition: String.h:46
String view class (similar to std::string_view).
Definition: StringView.h:42