MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / newFile

Method newFile

src/openms/source/SYSTEM/File.cpp:821–828  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

819 }
820
821 String File::TemporaryFiles_::newFile()
822 {
823 String s = getTempDirectory().ensureLastChar('/') + getUniqueName();
824 std::lock_guard<std::mutex> _(mtx_);
825 filenames_.push_back(s);
826 // do NOT return filenames_.back() by ref, since another thread might resize the vector and invalidate the reference!
827 return s; // uses RVO, so its efficient
828 }
829
830 File::TemporaryFiles_::~TemporaryFiles_()
831 {

Callers 1

getTemporaryFileMethod · 0.80

Calls 1

push_backMethod · 0.45

Tested by

no test coverage detected