MCPcopy Create free account
hub / github.com/LAStools/LAStools / temp_path

Function temp_path

LASzip/src/mydefs.cpp:401–415  ·  view source on GitHub ↗

get the temp path include trailing delimiter. system default or temp_user. responsitility of the user if temp_user is a valid and terminated path. optional user defined temp path temp path to use

Source from the content-addressed store, hash-verified

399/// <param name="temp_user">optional user defined temp path</param>
400/// <returns>temp path to use</returns>
401std::string temp_path(std::string temp_user) {
402 std::string td;
403 if (temp_user.empty()) {
404 td = std::filesystem::temp_directory_path().string();
405 if (td.empty()) {
406 td = ".";
407 }
408 } else {
409 td = temp_user;
410 }
411 if (td.back() != DIRECTORY_SLASH) {
412 td += DIRECTORY_SLASH;
413 }
414 return td;
415}
416
417/// replace all occurrences of search in subject with replace and return new string
418std::string ReplaceString(const std::string& subject, const std::string& search, const std::string& replace) {

Callers 1

get_temp_file_baseFunction · 0.85

Calls 2

emptyMethod · 0.80
stringMethod · 0.45

Tested by

no test coverage detected