Page Speed Optimization Libraries
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Friends | List of all members
net_instaweb::FileSystem::InputFile Class Referenceabstract
Inheritance diagram for net_instaweb::FileSystem::InputFile:

Public Member Functions

virtual int Read (char *buf, int size, MessageHandler *handler)=0
 Note: This returns num bytes read, NOT a success bool.
virtual bool ReadFile (GoogleString *buf, int64 max_file_size, MessageHandler *handler)=0
- Public Member Functions inherited from net_instaweb::FileSystem::File
virtual const char * filename ()=0
 Gets the name of the file.


class FileSystem

Additional Inherited Members

- Protected Member Functions inherited from net_instaweb::FileSystem::File
virtual bool Close (MessageHandler *handler)=0

Member Function Documentation

virtual bool net_instaweb::FileSystem::InputFile::ReadFile ( GoogleString buf,
int64  max_file_size,
MessageHandler handler 
pure virtual

Reads entire file into buf, returning true if successful. Calling this with max_file_size=kUnlimitedSize doesn't limit the read size, but it's dangerous, since we can OOM if the file somehow ended up being much larger than expected, so you should set a reasonable limit.

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