Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | List of all members
net_instaweb::FileDriver Class Reference

#include "file_driver.h"

Public Member Functions

 FileDriver (HtmlParse *html_parse, FileSystem *file_system)
 
HtmlParsehtml_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)
 

Detailed Description

Framework for reading an input HTML file, running it through a chain of HTML filters, and writing an output file.

Member Function Documentation

static bool net_instaweb::FileDriver::GenerateOutputFilename ( const char *  infilename,
GoogleString outfilename 
)
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 bool net_instaweb::FileDriver::GenerateStatsFilename ( const char *  infilename,
GoogleString statsfilename 
)
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.


The documentation for this class was generated from the following file: