minor vfs tweaks

This commit is contained in:
David Rose 2008-11-05 01:09:44 +00:00
parent 18605b1668
commit a0220f786c
2 changed files with 6 additions and 2 deletions

View File

@ -115,11 +115,14 @@ skip_bytes(size_t size) {
// Function: StreamReader::extract_bytes
// Access: Published
// Description: Extracts the indicated number of bytes in the
// stream and returns them as a string.
// stream and returns them as a string. Returns empty
// string at end-of-file.
////////////////////////////////////////////////////////////////////
string StreamReader::
extract_bytes(size_t size) {
nassertr(!_in->eof() && !_in->fail(), string());
if (_in->eof() || _in->fail()) {
return string();
}
char *buffer = (char *)alloca(size);
_in->read(buffer, size);

View File

@ -32,6 +32,7 @@ public:
const Filename &local_filename,
bool implicit_pz_file);
PUBLISHED:
virtual VirtualFileSystem *get_file_system() const;
INLINE VirtualFileMount *get_mount() const;
virtual Filename get_filename() const;