ContentRedirectionModule/src/FSWrapperMergeDirsWithParent.h

37 lines
1.1 KiB
C
Raw Normal View History

2022-04-14 22:41:41 +02:00
#pragma once
#include "DirInfoEx.h"
#include "FSWrapper.h"
#include <coreinit/filesystem.h>
#include <functional>
class FSWrapperMergeDirsWithParent : public FSWrapper {
public:
FSWrapperMergeDirsWithParent(const std::string &name,
const std::string &pathToReplace,
const std::string &replaceWithPath,
bool fallbackOnError);
~FSWrapperMergeDirsWithParent() override;
FSError FSOpenDirWrapper(const char *path,
FSDirectoryHandle *handle) override;
2022-04-14 22:41:41 +02:00
FSError FSReadDirWrapper(FSDirectoryHandle handle,
FSDirectoryEntry *entry) override;
2022-04-14 22:41:41 +02:00
FSError FSCloseDirWrapper(FSDirectoryHandle handle) override;
2022-04-14 22:41:41 +02:00
FSError FSRewindDirWrapper(FSDirectoryHandle handle) override;
2022-04-14 22:41:41 +02:00
std::shared_ptr<DirInfo> getNewDirHandle() override;
2022-04-14 22:41:41 +02:00
bool SkipDeletedFilesInReadDir() override;
private:
void freeFSClient();
FSClient *pFSClient;
FSCmdBlock *pCmdBlock;
std::shared_ptr<DirInfoEx> getDirExFromHandle(FSDirectoryHandle handle);
2022-04-14 22:41:41 +02:00
};