parent
a84604f566
commit
a92dbabc25
|
@ -67,7 +67,7 @@ public:
|
||||||
FileSystemFilter(const std::string& file, IOSystem* old)
|
FileSystemFilter(const std::string& file, IOSystem* old)
|
||||||
: mWrapped (old)
|
: mWrapped (old)
|
||||||
, mSrc_file(file)
|
, mSrc_file(file)
|
||||||
, sep(wrapped->getOsSeparator()) {
|
, sep(mWrapped->getOsSeparator()) {
|
||||||
ai_assert(nullptr != mWrapped);
|
ai_assert(nullptr != mWrapped);
|
||||||
|
|
||||||
// Determine base directory
|
// Determine base directory
|
||||||
|
@ -101,6 +101,7 @@ public:
|
||||||
/** Tests for the existence of a file at the given path. */
|
/** Tests for the existence of a file at the given path. */
|
||||||
bool Exists( const char* pFile) const {
|
bool Exists( const char* pFile) const {
|
||||||
ai_assert( nullptr != mWrapped );
|
ai_assert( nullptr != mWrapped );
|
||||||
|
|
||||||
std::string tmp = pFile;
|
std::string tmp = pFile;
|
||||||
|
|
||||||
// Currently this IOSystem is also used to open THE ONE FILE.
|
// Currently this IOSystem is also used to open THE ONE FILE.
|
||||||
|
@ -165,51 +166,51 @@ public:
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
/** Pushes a new directory onto the directory stack. */
|
/** Pushes a new directory onto the directory stack. */
|
||||||
bool PushDirectory(const std::string &path)
|
bool PushDirectory(const std::string &path ) {
|
||||||
{
|
ai_assert( nullptr != mWrapped );
|
||||||
return wrapped->PushDirectory(path);
|
return mWrapped->PushDirectory(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
/** Returns the top directory from the stack. */
|
/** Returns the top directory from the stack. */
|
||||||
const std::string &CurrentDirectory() const
|
const std::string &CurrentDirectory() const {
|
||||||
{
|
ai_assert( nullptr != mWrapped );
|
||||||
return wrapped->CurrentDirectory();
|
return mWrapped->CurrentDirectory();
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
/** Returns the number of directories stored on the stack. */
|
/** Returns the number of directories stored on the stack. */
|
||||||
size_t StackSize() const
|
size_t StackSize() const {
|
||||||
{
|
ai_assert( nullptr != mWrapped );
|
||||||
return wrapped->StackSize();
|
return mWrapped->StackSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
/** Pops the top directory from the stack. */
|
/** Pops the top directory from the stack. */
|
||||||
bool PopDirectory()
|
bool PopDirectory() {
|
||||||
{
|
ai_assert( nullptr != mWrapped );
|
||||||
return wrapped->PopDirectory();
|
return mWrapped->PopDirectory();
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
/** Creates an new directory at the given path. */
|
/** Creates an new directory at the given path. */
|
||||||
bool CreateDirectory(const std::string &path)
|
bool CreateDirectory(const std::string &path) {
|
||||||
{
|
ai_assert( nullptr != mWrapped );
|
||||||
return wrapped->CreateDirectory(path);
|
return mWrapped->CreateDirectory(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
/** Will change the current directory to the given path. */
|
/** Will change the current directory to the given path. */
|
||||||
bool ChangeDirectory(const std::string &path)
|
bool ChangeDirectory(const std::string &path) {
|
||||||
{
|
ai_assert( nullptr != mWrapped );
|
||||||
return wrapped->ChangeDirectory(path);
|
return mWrapped->ChangeDirectory(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
/** Delete file. */
|
/** Delete file. */
|
||||||
bool DeleteFile(const std::string &file)
|
bool DeleteFile(const std::string &file) {
|
||||||
{
|
ai_assert( nullptr != mWrapped );
|
||||||
return wrapped->DeleteFile(file);
|
return mWrapped->DeleteFile(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in New Issue