FileSystem: Move separator macro to path.h

This commit is contained in:
Stenzek 2024-11-14 00:07:58 +10:00
parent babaffcce9
commit 350429466a
No known key found for this signature in database
2 changed files with 8 additions and 8 deletions

View File

@ -16,14 +16,6 @@
class Error;
#ifdef _WIN32
#define FS_OSPATH_SEPARATOR_CHARACTER '\\'
#define FS_OSPATH_SEPARATOR_STR "\\"
#else
#define FS_OSPATH_SEPARATOR_CHARACTER '/'
#define FS_OSPATH_SEPARATOR_STR "/"
#endif
enum FILESYSTEM_FILE_ATTRIBUTES
{
FILESYSTEM_FILE_ATTRIBUTE_DIRECTORY = (1 << 0),

View File

@ -9,6 +9,14 @@
#include <string_view>
#include <vector>
#ifdef _WIN32
#define FS_OSPATH_SEPARATOR_CHARACTER '\\'
#define FS_OSPATH_SEPARATOR_STR "\\"
#else
#define FS_OSPATH_SEPARATOR_CHARACTER '/'
#define FS_OSPATH_SEPARATOR_STR "/"
#endif
namespace Path {
/// Converts any forward slashes to backslashes on Win32.
std::string ToNativePath(std::string_view path);