1.5: Fuckin' UE5... #38
2 changed files with 16 additions and 1 deletions
|
@ -35,7 +35,9 @@
|
||||||
|
|
||||||
namespace mbst { namespace Managers {
|
namespace mbst { namespace Managers {
|
||||||
|
|
||||||
BackupManager::BackupManager() {
|
BackupManager::BackupManager():
|
||||||
|
_vfs()
|
||||||
|
{
|
||||||
refresh();
|
refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,6 +51,8 @@ BackupManager::refresh() {
|
||||||
_backups = Containers::Array<Backup>{};
|
_backups = Containers::Array<Backup>{};
|
||||||
|
|
||||||
scanSubdir(""_s);
|
scanSubdir(""_s);
|
||||||
|
|
||||||
|
_vfs.build(_backups);
|
||||||
}
|
}
|
||||||
|
|
||||||
Containers::ArrayView<const Backup>
|
Containers::ArrayView<const Backup>
|
||||||
|
@ -56,6 +60,12 @@ BackupManager::backups() const {
|
||||||
return _backups;
|
return _backups;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const Vfs::VirtualFileSystem<Backup>&
|
||||||
|
BackupManager::vfs() const
|
||||||
|
{
|
||||||
|
return _vfs;
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
BackupManager::create(const GameObjects::Profile& profile) {
|
BackupManager::create(const GameObjects::Profile& profile) {
|
||||||
if(!profile.valid()) {
|
if(!profile.valid()) {
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
#include "Backup.h"
|
#include "Backup.h"
|
||||||
#include "../GameObjects/Profile.h"
|
#include "../GameObjects/Profile.h"
|
||||||
|
#include "Vfs/VirtualFileSystem.h"
|
||||||
|
|
||||||
using namespace Corrade;
|
using namespace Corrade;
|
||||||
|
|
||||||
|
@ -40,6 +41,8 @@ class BackupManager {
|
||||||
|
|
||||||
auto backups() const -> Containers::ArrayView<const Backup>;
|
auto backups() const -> Containers::ArrayView<const Backup>;
|
||||||
|
|
||||||
|
auto vfs() const -> const Vfs::VirtualFileSystem<Backup>&;
|
||||||
|
|
||||||
bool create(const GameObjects::Profile& profile);
|
bool create(const GameObjects::Profile& profile);
|
||||||
bool remove(std::size_t index);
|
bool remove(std::size_t index);
|
||||||
bool restore(std::size_t index);
|
bool restore(std::size_t index);
|
||||||
|
@ -50,6 +53,8 @@ class BackupManager {
|
||||||
Containers::String _lastError;
|
Containers::String _lastError;
|
||||||
|
|
||||||
Containers::Array<Backup> _backups;
|
Containers::Array<Backup> _backups;
|
||||||
|
|
||||||
|
Vfs::VirtualFileSystem<Backup> _vfs;
|
||||||
};
|
};
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
|
Loading…
Reference in a new issue