aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Common
diff options
context:
space:
mode:
Diffstat (limited to 'Minecraft.Client/Common')
-rw-r--r--Minecraft.Client/Common/Audio/SoundEngine.cpp2
-rw-r--r--Minecraft.Client/Common/Filesystem/Filesystem.cpp74
-rw-r--r--Minecraft.Client/Common/Filesystem/Filesystem.h6
3 files changed, 1 insertions, 81 deletions
diff --git a/Minecraft.Client/Common/Audio/SoundEngine.cpp b/Minecraft.Client/Common/Audio/SoundEngine.cpp
index 12fa03b4..13826da3 100644
--- a/Minecraft.Client/Common/Audio/SoundEngine.cpp
+++ b/Minecraft.Client/Common/Audio/SoundEngine.cpp
@@ -25,7 +25,7 @@
#include <vector>
#include <memory>
#include <mutex>
-#include "..\Filesystem\Filesystem.h"
+#include <lce_filesystem\lce_filesystem.h>
#ifdef __ORBIS__
#include <audioout.h>
diff --git a/Minecraft.Client/Common/Filesystem/Filesystem.cpp b/Minecraft.Client/Common/Filesystem/Filesystem.cpp
deleted file mode 100644
index 0d225cb5..00000000
--- a/Minecraft.Client/Common/Filesystem/Filesystem.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-#include "stdafx.h"
-#include "Filesystem.h"
-
-#ifdef _WINDOWS64
-#include <windows.h>
-#endif // TODO: More os' filesystem handling for when the project moves away from only Windows
-
-#include <stdio.h>
-
-bool FileOrDirectoryExists(const char* path)
-{
-#ifdef _WINDOWS64
- DWORD attribs = GetFileAttributesA(path);
- return (attribs != INVALID_FILE_ATTRIBUTES);
-#else
- #error "FileOrDirectoryExists not implemented for this platform"
- return false;
-#endif
-}
-
-bool FileExists(const char* path)
-{
-#ifdef _WINDOWS64
- DWORD attribs = GetFileAttributesA(path);
- return (attribs != INVALID_FILE_ATTRIBUTES && !(attribs & FILE_ATTRIBUTE_DIRECTORY));
-#else
- #error "FileExists not implemented for this platform"
- return false;
-#endif
-}
-
-bool DirectoryExists(const char* path)
-{
-#ifdef _WINDOWS64
- DWORD attribs = GetFileAttributesA(path);
- return (attribs != INVALID_FILE_ATTRIBUTES && (attribs & FILE_ATTRIBUTE_DIRECTORY));
-#else
- #error "DirectoryExists not implemented for this platform"
- return false;
-#endif
-}
-
-bool GetFirstFileInDirectory(const char* directory, char* outFilePath, size_t outFilePathSize)
-{
-#ifdef _WINDOWS64
- char searchPath[MAX_PATH];
- snprintf(searchPath, MAX_PATH, "%s\\*", directory);
-
- WIN32_FIND_DATAA findData;
- HANDLE hFind = FindFirstFileA(searchPath, &findData);
-
- if (hFind == INVALID_HANDLE_VALUE)
- {
- return false;
- }
-
- do
- {
- if (!(findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
- {
- // Found a file, copy its path to the output buffer
- snprintf(outFilePath, outFilePathSize, "%s\\%s", directory, findData.cFileName);
- FindClose(hFind);
- return true;
- }
- } while (FindNextFileA(hFind, &findData) != 0);
-
- FindClose(hFind);
- return false; // No files found in the directory
-#else
- #error "GetFirstFileInDirectory not implemented for this platform"
- return false;
-#endif
-}
diff --git a/Minecraft.Client/Common/Filesystem/Filesystem.h b/Minecraft.Client/Common/Filesystem/Filesystem.h
deleted file mode 100644
index 11d1bf5b..00000000
--- a/Minecraft.Client/Common/Filesystem/Filesystem.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#pragma once
-
-bool FileOrDirectoryExists(const char* path);
-bool FileExists(const char* path);
-bool DirectoryExists(const char* path);
-bool GetFirstFileInDirectory(const char* directory, char* outFilePath, size_t outFilePathSize);