omg it's very hacky but mounting kinda works

This commit is contained in:
2023-06-08 12:00:45 +02:00
parent 97cc03770e
commit f24f075cca
10 changed files with 250 additions and 9 deletions

View File

@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.22)
add_library(commands srcs/Command.cpp srcs/CommandDiff.cpp srcs/CommandList.cpp srcs/CommandListFiles.cpp srcs/CommandRestore.cpp srcs/CommandRun.cpp srcs/CommandsCommon.cpp srcs/Diff.cpp)
add_library(commands srcs/Command.cpp srcs/CommandDiff.cpp srcs/CommandList.cpp srcs/CommandListFiles.cpp srcs/CommandRestore.cpp srcs/CommandRun.cpp srcs/CommandsCommon.cpp srcs/Diff.cpp srcs/CommandMount.cpp)
target_include_directories(commands PUBLIC includes)
target_link_libraries(commands crypto repo chunkers utils change_detectors)
target_link_libraries(commands crypto repo chunkers utils change_detectors fuse)

View File

@@ -0,0 +1,17 @@
//
// Created by Stepan Usatiuk on 07.06.2023.
//
#ifndef BACKUP_COMMANDMOUNT_H
#define BACKUP_COMMANDMOUNT_H
#include "Command.h"
class CommandMount : public Command {
public:
CommandMount();
void run(Context ctx) override;
};
#endif//BACKUP_COMMANDMOUNT_H

View File

@@ -0,0 +1,14 @@
//
// Created by Stepan Usatiuk on 07.06.2023.
//
#include "../includes/CommandMount.h"
#include "RepoFS.h"
CommandMount::CommandMount() : Command("mount") {
}
void CommandMount::run(Context ctx) {
RepoFS rfs(ctx.repo, ctx.repo->getObjects(Object::ObjectType::Archive).begin()->second, "./hi");
rfs.workerFn();
}