mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-28 11:09:40 +00:00
[Server] Deprecate DoesFileExist(), add DoesFilePathExist()
This commit is contained in:
parent
2cdabddc0e
commit
5c4d3df551
2 changed files with 11 additions and 4 deletions
|
@ -47,7 +47,7 @@ void ServerFunctions::UnbanAddress(const char *ipAddress) noexcept
|
|||
mwmp::Networking::getPtr()->unbanAddress(ipAddress);
|
||||
}
|
||||
|
||||
bool ServerFunctions::DoesFileExist(const char *filePath) noexcept
|
||||
bool ServerFunctions::DoesFilePathExist(const char *filePath) noexcept
|
||||
{
|
||||
return boost::filesystem::exists(filePath);
|
||||
}
|
||||
|
@ -205,6 +205,11 @@ void ServerFunctions::AddDataFileRequirement(const char *dataFilename, const cha
|
|||
|
||||
// All methods below are deprecated versions of methods from above
|
||||
|
||||
bool ServerFunctions::DoesFileExist(const char *filePath) noexcept
|
||||
{
|
||||
return DoesFilePathExist(filePath);
|
||||
}
|
||||
|
||||
const char* ServerFunctions::GetModDir() noexcept
|
||||
{
|
||||
return GetDataPath();
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
{"BanAddress", ServerFunctions::BanAddress},\
|
||||
{"UnbanAddress", ServerFunctions::UnbanAddress},\
|
||||
\
|
||||
{"DoesFileExist", ServerFunctions::DoesFileExist},\
|
||||
{"DoesFilePathExist", ServerFunctions::DoesFilePathExist},\
|
||||
{"GetCaseInsensitiveFilename", ServerFunctions::GetCaseInsensitiveFilename},\
|
||||
{"GetDataPath", ServerFunctions::GetDataPath},\
|
||||
{"GetOperatingSystemType", ServerFunctions::GetOperatingSystemType},\
|
||||
|
@ -38,6 +38,7 @@
|
|||
\
|
||||
{"AddDataFileRequirement", ServerFunctions::AddDataFileRequirement},\
|
||||
\
|
||||
{"DoesFileExist", ServerFunctions::DoesFileExist},\
|
||||
{"GetModDir", ServerFunctions::GetModDir},\
|
||||
{"AddPluginHash", ServerFunctions::AddPluginHash}
|
||||
|
||||
|
@ -102,7 +103,7 @@ public:
|
|||
static void UnbanAddress(const char *ipAddress) noexcept;
|
||||
|
||||
/**
|
||||
* \brief Check whether a certain file exists.
|
||||
* \brief Check whether a certain file path exists.
|
||||
*
|
||||
* This will be a case sensitive check on case sensitive filesystems.
|
||||
*
|
||||
|
@ -110,7 +111,7 @@ public:
|
|||
*
|
||||
* \return Whether the file exists or not.
|
||||
*/
|
||||
static bool DoesFileExist(const char *filePath) noexcept;
|
||||
static bool DoesFilePathExist(const char *filePath) noexcept;
|
||||
|
||||
/**
|
||||
* \brief Get the first filename in a folder that has a case insensitive match with the filename
|
||||
|
@ -296,6 +297,7 @@ public:
|
|||
|
||||
// All methods below are deprecated versions of methods from above
|
||||
|
||||
static bool DoesFileExist(const char *filePath) noexcept;
|
||||
static const char *GetModDir() noexcept;
|
||||
static void AddPluginHash(const char *pluginName, const char *checksumString) noexcept;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue