MCPcopy Create free account
hub / github.com/Autodesk/Aurora / writeStringToFile

Function writeStringToFile

Libraries/Foundation/Source/Utilities.cpp:44–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44bool writeStringToFile(
45 const std::string& str, const std::string& filename, const std::string& folder)
46{
47 // If the folder is empty, use the module path.
48 std::string pathFolder = folder.empty() ? getModulePath() : folder;
49
50 // Create path from folder+filename (assume slash at end of folder.)
51 std::string path = pathFolder + filename;
52
53 // Write string to output stream.
54 std::ofstream outputFile;
55 outputFile.open(path);
56 outputFile << str;
57 if (!outputFile.good())
58 return false;
59 outputFile.close();
60
61 return true;
62}
63
64void hashCombine(size_t& seed, size_t otherHash)
65{

Callers 2

createMaterialPointerMethod · 0.85
rebuildMethod · 0.85

Calls 2

getModulePathFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected