MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / get_file

Method get_file

dds/DCPS/FileSystemStorage.cpp:537–552  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

535}
536
537File::Ptr Directory::get_file(const char* name)
538{
539 if (std::strlen(name) >= FSS_MAX_FILE_NAME) {
540 throw std::runtime_error("file name too long");
541 }
542
543 ACE_TString t_name(ACE_TEXT_CHAR_TO_TCHAR(name));
544 Map::iterator it = files_.find(t_name);
545
546 if (it == files_.end()) {
547 return make_new_file(t_name);
548
549 } else {
550 return DCPS::make_rch<File>(full_path(it->second), it->first, rchandle_from(this));
551 }
552}
553
554File::Ptr Directory::make_new_file(const ACE_TString& t_name)
555{

Callers 1

ACE_TMAINFunction · 0.80

Calls 3

rchandle_fromFunction · 0.85
findMethod · 0.45
endMethod · 0.45

Tested by 1

ACE_TMAINFunction · 0.64