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

void DefaultSaveFileManager::checkPath ( const Common::FSNode dir  )  [protected, virtual]

Checks the given path for read access, existence, etc. Sets the internal error and error message accordingly.

Reimplemented in PSPSaveFileManager.

Definition at line 48 of file default-saves.cpp.

References Common::SaveFileManager::clearError(), Common::FSNode::exists(), Common::FSNode::getPath(), Common::FSNode::isDirectory(), Common::kPathDoesNotExist, Common::kPathNotDirectory, and Common::SaveFileManager::setError().

Referenced by listSavefiles(), openForLoading(), openForSaving(), and removeSavefile().

                                                              {
      clearError();
      if (!dir.exists()) {
            setError(Common::kPathDoesNotExist, "The savepath '"+dir.getPath()+"' does not exist");
      } else if (!dir.isDirectory()) {
            setError(Common::kPathNotDirectory, "The savepath '"+dir.getPath()+"' is not a directory");
      }
}


Generated by  Doxygen 1.6.0   Back to index