| 15 | namespace amrex::FileSystem { |
| 16 | |
| 17 | bool |
| 18 | Exists (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 | |
| 29 | std::string |
| 30 | CurrentPath () |
no test coverage detected