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;
|
|
|
|
|
2022-08-07 19:22:20 +02:00
|
|
|
FSError FSOpenDirWrapper(const char *path,
|
|
|
|
FSDirectoryHandle *handle) override;
|
2022-04-14 22:41:41 +02:00
|
|
|
|
2022-08-07 19:22:20 +02:00
|
|
|
FSError FSReadDirWrapper(FSDirectoryHandle handle,
|
|
|
|
FSDirectoryEntry *entry) override;
|
2022-04-14 22:41:41 +02:00
|
|
|
|
2022-08-07 19:22:20 +02:00
|
|
|
FSError FSCloseDirWrapper(FSDirectoryHandle handle) override;
|
2022-04-14 22:41:41 +02:00
|
|
|
|
2022-08-07 19:22:20 +02:00
|
|
|
FSError FSRewindDirWrapper(FSDirectoryHandle handle) override;
|
2022-04-14 22:41:41 +02:00
|
|
|
|
2022-04-29 13:34:04 +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;
|
|
|
|
|
2022-04-29 13:34:04 +02:00
|
|
|
std::shared_ptr<DirInfoEx> getDirExFromHandle(FSDirectoryHandle handle);
|
2022-04-14 22:41:41 +02:00
|
|
|
};
|