Limo
A simple mod manager
Loading...
Searching...
No Matches
file.h
Go to the documentation of this file.
1
5
6#pragma once
7
8#include <filesystem>
9
10
15namespace fomod
16{
20struct File
21{
23 std::filesystem::path source;
25 std::filesystem::path destination = "";
27 bool always_install = false;
29 bool install_if_usable = false;
31 int priority = -std::numeric_limits<int>::max();
32
38 bool operator==(const File& other) const
39 {
40 return destination.string() == other.destination.string();
41 }
42
47 bool operator<(const File& other) const { return priority < other.priority; }
48};
49}
The fomod namespace contains classes used for parsing a FOMOD xml file and for creating an installer.
Definition dependency.h:22
Holds data regarding the installation of a single file in a fomod configuration.
Definition file.h:21
bool operator==(const File &other) const
Compares two File objects by their destination.
Definition file.h:38
bool always_install
If True: Always install, regardless of selection.
Definition file.h:27
bool operator<(const File &other) const
Compares two File objects by their priority.
Definition file.h:47
bool install_if_usable
If True: Always install if dependencies are fulfilled.
Definition file.h:29
int priority
If two files share a destination, the higher priority file gets installed.
Definition file.h:31
std::filesystem::path destination
Destination path, relative to target root.
Definition file.h:25
std::filesystem::path source
Source path, relative to mods root directory.
Definition file.h:23