Path类调整

This commit is contained in:
Nomango 2018-07-03 01:52:11 +08:00
parent 0cf402e6e0
commit 1d9f543eb8
4 changed files with 7 additions and 7 deletions

View File

@ -161,7 +161,7 @@ bool e2d::Image::preload(const String& filePath)
return true;
}
String actualFilePath = Path::searchForFile(filePath);
String actualFilePath = Path::findFile(filePath);
if (actualFilePath.isEmpty())
{
return false;

View File

@ -85,7 +85,7 @@ bool e2d::Music::open(const e2d::String& filePath)
return false;
}
String actualFilePath = Path::searchForFile(filePath);
String actualFilePath = Path::findFile(filePath);
if (actualFilePath.isEmpty())
{
WARN("MusicInfo::open File not found.");

View File

@ -69,7 +69,7 @@ void e2d::Path::setGameFolderName(const String & name)
}
}
void e2d::Path::add(String path)
void e2d::Path::addSearchPath(String path)
{
path.replace(L"/", L"\\");
if (path[path.getLength() - 1] != L'\\')
@ -98,7 +98,7 @@ e2d::String e2d::Path::getExecutableFilePath()
return std::move(String());
}
e2d::String e2d::Path::searchForFile(const String& path)
e2d::String e2d::Path::findFile(const String& path)
{
if (Path::exists(path))
{

View File

@ -447,13 +447,13 @@ public:
const String& name
);
// Ìí¼ÓËÑË÷·¾¶
static void add(
// Ìí¼Ó×ÊÔ´ËÑË÷·¾¶
static void addSearchPath(
String path
);
// 检索文件路径
static String searchForFile(
static String findFile(
const String& path
);