Gromacs  2020.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions | Variables
gmx::anonymous_namespace{filenameoptionmanager.cpp} Namespace Reference

Functions

std::string findExistingExtension (const std::string &prefix, const FileNameOptionInfo &option, const IFileInputRedirector *redirector)
 Adds an extension to prefix if it results in an existing file. More...
 

Variables

const char *const c_compressedExtensions [] = { ".gz", ".Z" }
 Extensions that are recognized as compressed files.
 

Function Documentation

std::string gmx::anonymous_namespace{filenameoptionmanager.cpp}::findExistingExtension ( const std::string &  prefix,
const FileNameOptionInfo &  option,
const IFileInputRedirector *  redirector 
)

Adds an extension to prefix if it results in an existing file.

Tries to add each extension for this file type to prefix and checks whether this results in an existing file. The first match is returned. Returns an empty string if no existing file is found.