must_exist,
/// Only do file name expansion, return the complete name even if
/// the file does not exist
must_exist,
/// Only do file name expansion, return the complete name even if
/// the file does not exist
+ may_not_exist,
+ /// The (image) file may be present with hi-dpi resolution -
+ /// the lookup checks for a file named "image" + "@2x" + ".ext" first.
+ /// If found it will return e.g. "image@2x.png" instead of "image.png".
+ /// Otherwise it will work as must_exist.
+ check_hidpi
*/
FileName const libFileSearch(std::string const & dir,
std::string const & name,
*/
FileName const libFileSearch(std::string const & dir,
std::string const & name,
/** Same as libFileSearch(), but tries first to find an
internationalized version of the file by prepending $LANG_ to the
/** Same as libFileSearch(), but tries first to find an
internationalized version of the file by prepending $LANG_ to the
/// How to quote a filename
enum quote_style {
/** Quote for the (OS dependant) shell. This is needed for command
line arguments of subprocesses. */
quote_shell,
/// How to quote a filename
enum quote_style {
/** Quote for the (OS dependant) shell. This is needed for command
line arguments of subprocesses. */
quote_shell,
/** Quote for python. Use this if you want to store a filename in a
python script. Example: \code
os << "infile = " << quoteName(filename) << '\\n';
/** Quote for python. Use this if you want to store a filename in a
python script. Example: \code
os << "infile = " << quoteName(filename) << '\\n';
FileName const unzipFile(FileName const & zipped_file,
std::string const & unzipped_file = std::string());
FileName const unzipFile(FileName const & zipped_file,
std::string const & unzipped_file = std::string());
/** Convert relative path into absolute path based on a basepath.
If relpath is absolute, just use that.
If basepath doesn't exist use CWD.
/** Convert relative path into absolute path based on a basepath.
If relpath is absolute, just use that.
If basepath doesn't exist use CWD.
/** Replace all references to a current directory (a lonely '.' or
the prefix "./") in \c pathlist with \c path. Also prefixes
/** Replace all references to a current directory (a lonely '.' or
the prefix "./") in \c pathlist with \c path. Also prefixes
FileName const findtexfile(std::string const & fil,
std::string const & format);
FileName const findtexfile(std::string const & fil,
std::string const & format);
/** \param file1, file2 the two files to be compared. Must have absolute paths.
* \returns 1 if \c file1 has a more recent timestamp than \c file2,
* 0 if their timestamps are the same,
/** \param file1, file2 the two files to be compared. Must have absolute paths.
* \returns 1 if \c file1 has a more recent timestamp than \c file2,
* 0 if their timestamps are the same,
typedef std::pair<int, std::string> cmd_ret;
cmd_ret const runCommand(std::string const & cmd);
typedef std::pair<int, std::string> cmd_ret;
cmd_ret const runCommand(std::string const & cmd);