38 lines
707 B
C++
38 lines
707 B
C++
|
|
#pragma once
|
|
|
|
#include "filereader.h"
|
|
|
|
#if BEATSABERZIPSUPPORT == 1
|
|
#include <zipios/zipfile.hpp>
|
|
#endif
|
|
|
|
namespace Beatsaber {
|
|
|
|
//implementation for folders
|
|
class FolderReader : public FileReader {
|
|
protected:
|
|
std::string path;
|
|
|
|
public:
|
|
FolderReader(const std::string& path);
|
|
virtual ~FolderReader();
|
|
|
|
virtual std::shared_ptr<std::istream> getFileStream(const std::string& filename) override;
|
|
};
|
|
|
|
#if BEATSABERZIPSUPPORT == 1
|
|
//implementation for zipfiles
|
|
class ZipReader : public FileReader {
|
|
protected:
|
|
zipios::ZipFile file;
|
|
|
|
public:
|
|
ZipReader(const std::string& path);
|
|
virtual ~ZipReader();
|
|
|
|
virtual std::shared_ptr<std::istream> getFileStream(const std::string& filename) override;
|
|
};
|
|
#endif
|
|
|
|
} |