From 79bb654b80d5eb7a65814f80b9ca7ca1ccd62a00 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 4 Mar 2017 00:27:54 +0300 Subject: Reimplement VirtFs in correct way. Now all tests should pass. --- src/fs/virtfs/virtfs.h | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 src/fs/virtfs/virtfs.h (limited to 'src/fs/virtfs/virtfs.h') diff --git a/src/fs/virtfs/virtfs.h b/src/fs/virtfs/virtfs.h new file mode 100644 index 000000000..bf05b7f90 --- /dev/null +++ b/src/fs/virtfs/virtfs.h @@ -0,0 +1,51 @@ +/* + * The ManaPlus Client + * Copyright (C) 2013-2017 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef UTILS_FS_VIRTFS_VIRTFS_H +#define UTILS_FS_VIRTFS_VIRTFS_H + +#include "enums/simpletypes/append.h" + +#include "localconsts.h" + +#include +#include + +struct VirtFsEntry; + +namespace VirtFs +{ + bool addDirToSearchPathInternal(const std::string &restrict newDir, + const Append append); + bool removeDirFromSearchPathInternal(std::string oldDir); + std::vector &getEntries(); + VirtFsEntry *searchEntryByRootInternal(const std::string &restrict + root); + VirtFsEntry *searchEntryInternal(const std::string &restrict root, + const FsEntryType type); + void addEntry(VirtFsEntry *const entry, + const Append append); +#ifdef UNITTESTS + bool addDirToSearchPathSilent2(std::string newDir, + const Append append); +#endif // UNITTESTS +} // namespace VirtFs + +#endif // UTILS_FS_VIRTFS_VIRTFS_H -- cgit v1.2.3-60-g2f50