summaryrefslogtreecommitdiff
path: root/src/main_windows.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main_windows.cpp')
-rw-r--r--src/main_windows.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main_windows.cpp b/src/main_windows.cpp
index c574b2f..7c6fba2 100644
--- a/src/main_windows.cpp
+++ b/src/main_windows.cpp
@@ -52,6 +52,16 @@ static const char* _ts_platform_get_config_file_path(char* buffer) {
return 0;
}
+bool ts_platform_dir_exists(utf8_int8_t* dir)
+{
+ DWORD ftyp = GetFileAttributesA(dir);
+ if (ftyp == INVALID_FILE_ATTRIBUTES)
+ return false;
+ if (ftyp & FILE_ATTRIBUTE_DIRECTORY)
+ return true;
+ return false;
+}
+
uint64_t ts_platform_get_time(uint64_t compare)
{
LARGE_INTEGER stamp;