From 12999050262d8a6213cf6b1f136a11fa80f57066 Mon Sep 17 00:00:00 2001 From: mbuchner Date: Mon, 12 Feb 2018 11:20:03 +0100 Subject: [PATCH] Make FileSystemFilter forward all virtual functions to wrapped IOSystem instance This makes it possible to override those functions. Previously the default implementation was always used. Fixes #1773 --- code/FileSystemFilter.h | 49 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/code/FileSystemFilter.h b/code/FileSystemFilter.h index 0fabb41dd..10b18bd78 100644 --- a/code/FileSystemFilter.h +++ b/code/FileSystemFilter.h @@ -168,6 +168,55 @@ public: return wrapped->ComparePaths (one,second); } + // ------------------------------------------------------------------- + /** Pushes a new directory onto the directory stack. */ + bool PushDirectory(const std::string &path) + { + return wrapped->PushDirectory(path); + } + + // ------------------------------------------------------------------- + /** Returns the top directory from the stack. */ + const std::string &CurrentDirectory() const + { + return wrapped->CurrentDirectory(); + } + + // ------------------------------------------------------------------- + /** Returns the number of directories stored on the stack. */ + size_t StackSize() const + { + return wrapped->StackSize(); + } + + // ------------------------------------------------------------------- + /** Pops the top directory from the stack. */ + bool PopDirectory() + { + return wrapped->PopDirectory(); + } + + // ------------------------------------------------------------------- + /** Creates an new directory at the given path. */ + bool CreateDirectory(const std::string &path) + { + return wrapped->CreateDirectory(path); + } + + // ------------------------------------------------------------------- + /** Will change the current directory to the given path. */ + bool ChangeDirectory(const std::string &path) + { + return wrapped->ChangeDirectory(path); + } + + // ------------------------------------------------------------------- + /** Delete file. */ + bool DeleteFile(const std::string &file) + { + return wrapped->DeleteFile(file); + } + private: // -------------------------------------------------------------------