mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-10-05 19:41:40 +00:00
34 lines
779 B
C++
34 lines
779 B
C++
/*
|
|
* Function handling filenames and paths
|
|
*
|
|
* by WangLu
|
|
* 2012.11.29
|
|
*/
|
|
|
|
#ifndef PATH_H__
|
|
#define PATH_H__
|
|
|
|
#include <string>
|
|
|
|
namespace pdf2htmlEX {
|
|
|
|
void create_directories(const std::string & path);
|
|
|
|
bool is_truetype_suffix(const std::string & suffix);
|
|
|
|
std::string get_filename(const std::string & path);
|
|
std::string get_suffix(const std::string & path);
|
|
|
|
/**
|
|
* Sanitize all occurrences of '%' except for the first valid format specifier. Filename
|
|
* is only sanitized if a formatter is found, and the function returns true.
|
|
*
|
|
* @param filename the filename to be sanitized. Value will be modified.
|
|
*
|
|
* @return true if a format specifier was found, false otherwise.
|
|
*/
|
|
bool sanitize_filename(std::string & filename);
|
|
|
|
} //namespace pdf2htmlEX
|
|
#endif //PATH_H__
|