MCPcopy Create free account
hub / github.com/AMReX-Codes/amrex / Exists

Function Exists

Src/Base/AMReX_FileSystem.cpp:17–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15namespace amrex::FileSystem {
16
17bool
18Exists (std::string const& filename)
19{
20 std::error_code ec;
21 auto const status = std::filesystem::symlink_status(std::filesystem::path{filename}, ec);
22 bool const r = std::filesystem::exists(status);
23 if (ec && (status.type() != std::filesystem::file_type::not_found) && amrex::Verbose() > 0) {
24 amrex::AllPrint() << "amrex::FileSystem::Exists failed. " << ec.message() << '\n';
25 }
26 return r;
27}
28
29std::string
30CurrentPath ()

Callers 2

FileExistsMethod · 0.85

Calls 2

AllPrintClass · 0.85
typeMethod · 0.45

Tested by

no test coverage detected