Logo Search packages:      
Sourcecode: scummvm version File versions

Common::SeekableReadStream * Common::FSNode::createReadStream (  ) const [virtual]

Creates a SeekableReadStream instance corresponding to the file referred by this node. This assumes that the node actually refers to a readable file. If this is not the case, 0 is returned.

pointer to the stream object, 0 in case of a failure

Implements Common::ArchiveMember.

Definition at line 130 of file fs.cpp.

References getName().

Referenced by OSystem_PSP::createConfigReadStream(), BaseBackend::createConfigReadStream(), OSystem_Dreamcast::createConfigReadStream(), OSystem_PS2::createConfigReadStream(), OSystem_DS::createConfigReadStream(), OSystem_SDL::createConfigReadStream(), OSystem_IPHONE::createConfigReadStream(), Common::FSDirectory::createReadStreamForMember(), Sci::ResourceManager::detectMapVersion(), Common::MacResManager::open(), Common::File::open(), Ps2SaveFileManager::openForLoading(), DefaultSaveFileManager::openForLoading(), Agi::WagFileParser::parse(), Sci::ResourceManager::readResourceMapSCI0(), and Sci::ResourceManager::readResourceMapSCI1().

      if (_realNode == 0)
            return 0;

      if (!_realNode->exists()) {
            warning("FSNode::createReadStream: '%s' does not exist", getName().c_str());
            return false;
      } else if (_realNode->isDirectory()) {
            warning("FSNode::createReadStream: '%s' is a directory", getName().c_str());
            return false;

      return _realNode->createReadStream();

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index