Logo Search packages:      
Sourcecode: scummvm version File versions  Download package

Common::WriteStream * Common::FSNode::createWriteStream (  )  const

Creates a WriteStream 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.

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

Definition at line 145 of file fs.cpp.

References getName().

Referenced by DefaultSaveFileManager::openForSaving().

                                                   {
      if (_realNode == 0)
            return 0;

      if (_realNode->isDirectory()) {
            warning("FSNode::createWriteStream: '%s' is a directory", getName().c_str());
            return 0;
      }

      return _realNode->createWriteStream();
}


Generated by  Doxygen 1.6.0   Back to index