mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-04 17:54:01 +00:00
Allow servers to be run from directories other than build
. Read/write files relative to binary instead of cwd (#834)
Allows the server to be run from a non-build directory. Also only read or write files relative to the build directory, regardless of where the server is run from
This commit is contained in:
15
dCommon/BinaryPathFinder.h
Normal file
15
dCommon/BinaryPathFinder.h
Normal file
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef __BINARYPATHFINDER__H__
|
||||
#define __BINARYPATHFINDER__H__
|
||||
|
||||
#include <filesystem>
|
||||
|
||||
class BinaryPathFinder {
|
||||
private:
|
||||
static std::filesystem::path binaryDir;
|
||||
public:
|
||||
static std::filesystem::path GetBinaryDir();
|
||||
};
|
||||
|
||||
#endif //!__BINARYPATHFINDER__H__
|
Reference in New Issue
Block a user