1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-09-06 00:47:03 +00:00
pdf2htmlEX/src/util/path.h

34 lines
779 B
C
Raw Normal View History

2012-11-29 10:16:05 +00:00
/*
* Function handling filenames and paths
*
* by WangLu
* 2012.11.29
*/
#ifndef PATH_H__
#define PATH_H__
#include <string>
namespace pdf2htmlEX {
2012-11-29 11:43:19 +00:00
void create_directories(const std::string & path);
2012-11-29 10:16:05 +00:00
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);
2012-11-29 10:16:05 +00:00
} //namespace pdf2htmlEX
#endif //PATH_H__