summaryrefslogtreecommitdiff
path: root/Source/Core/Common/Src/FileUtil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/Common/Src/FileUtil.cpp')
-rw-r--r--Source/Core/Common/Src/FileUtil.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/Core/Common/Src/FileUtil.cpp b/Source/Core/Common/Src/FileUtil.cpp
index 648d909e79..0edb09e330 100644
--- a/Source/Core/Common/Src/FileUtil.cpp
+++ b/Source/Core/Common/Src/FileUtil.cpp
@@ -69,6 +69,18 @@ bool Exists(const char *filename)
return (result == 0);
}
+bool IsDisk(const char *filename)
+{
+#ifdef _WIN32
+ std::string copy = filename;
+ if (copy.size() < 4 && copy.c_str()[1] == ':')
+ return true;
+#else
+ // TODO: add linux \ osx
+#endif
+ return false;
+}
+
bool IsDirectory(const char *filename)
{
struct stat file_info;