Luanti 5.16.0-dev
 
Loading...
Searching...
No Matches
mod_vfs.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2025 Luanti authors
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5#pragma once
6
7#include <string>
8#include <unordered_map>
9
10struct ModVFS
11{
12 void scanModSubfolder(const std::string &mod_name, const std::string &mod_path,
13 std::string mod_subpath);
14
15 inline void scanModIntoMemory(const std::string &mod_name, const std::string &mod_path)
16 {
17 scanModSubfolder(mod_name, mod_path, "");
18 }
19
20 const std::string *getModFile(std::string filename);
21
22 std::unordered_map<std::string, std::string> m_vfs;
23};
Definition mod_vfs.h:11
void scanModIntoMemory(const std::string &mod_name, const std::string &mod_path)
Definition mod_vfs.h:15
std::unordered_map< std::string, std::string > m_vfs
Definition mod_vfs.h:22
void scanModSubfolder(const std::string &mod_name, const std::string &mod_path, std::string mod_subpath)
Definition mod_vfs.cpp:10
const std::string * getModFile(std::string filename)
Definition mod_vfs.cpp:41