Page Speed Optimization Libraries
1.13.35.1
|
#include "file_driver.h"
Public Member Functions | |
FileDriver (HtmlParse *html_parse, FileSystem *file_system) | |
HtmlParse * | html_parse () |
Return the parser. This can be used to add filters. | |
bool | ParseFile (const char *infilename, const char *outfilename, const char *statsfilename, MessageHandler *handler) |
void | set_flush_byte_count (int x) |
Indicates that we should Flush the parser every x bytes. Disabled if x<=0. | |
Static Public Member Functions | |
static bool | GenerateOutputFilename (const char *infilename, GoogleString *outfilename) |
static bool | GenerateStatsFilename (const char *infilename, GoogleString *statsfilename) |
Framework for reading an input HTML file, running it through a chain of HTML filters, and writing an output file.
|
static |
Helper function to generate an output .html filename from an input filename. Given "/a/b/c.html" returns "a/b/c.out.html". Returns false if the input file does not contain a "."
|
static |
Helper function to generate an output .stats filename from an input filename. Given "/a/b/c.html" returns "a/b/c.stats". Returns false if the input file does not contain a "."
bool net_instaweb::FileDriver::ParseFile | ( | const char * | infilename, |
const char * | outfilename, | ||
const char * | statsfilename, | ||
MessageHandler * | handler | ||
) |
Error messages are sent to the message file, true is returned if the file was parsed successfully.