aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Server/Common/FileUtils.h
diff options
context:
space:
mode:
authorqwasdrizzel <145519042+qwasdrizzel@users.noreply.github.com>2026-03-16 21:44:26 -0500
committerGitHub <noreply@github.com>2026-03-16 21:44:26 -0500
commitce739f6045ec72127491286ea3f3f21e537c1b55 (patch)
treef33bd42a47c1b4a7b2153a7fb77127ee3b407db9 /Minecraft.Server/Common/FileUtils.h
parent255a18fe8e9b57377975f82e2b227afe2a12eda0 (diff)
parent5a59f5d146b43811dde6a5a0245ee9875d7b5cd1 (diff)
Merge branch 'smartcmd:main' into main
Diffstat (limited to 'Minecraft.Server/Common/FileUtils.h')
-rw-r--r--Minecraft.Server/Common/FileUtils.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/Minecraft.Server/Common/FileUtils.h b/Minecraft.Server/Common/FileUtils.h
new file mode 100644
index 00000000..96e398cc
--- /dev/null
+++ b/Minecraft.Server/Common/FileUtils.h
@@ -0,0 +1,25 @@
+#pragma once
+
+#include <string>
+
+namespace ServerRuntime
+{
+ namespace FileUtils
+ {
+ /**
+ * Reads the full UTF-8 path target into memory without interpreting JSON or line endings
+ * UTF-8パスのテキストファイル全体をそのまま読み込む
+ */
+ bool ReadTextFile(const std::string &filePath, std::string *outText);
+ /**
+ * Writes text through a same-directory temporary file and publishes it with a single replacement step
+ * 同一ディレクトリの一時ファイル経由で安全に書き換える
+ */
+ bool WriteTextFileAtomic(const std::string &filePath, const std::string &text);
+ /**
+ * Returns the current UTC timestamp encoded in Windows FILETIME units for expiry comparisons
+ * 期限判定用に現在UTC時刻をWindows FILETIME単位で返す
+ */
+ unsigned long long GetCurrentUtcFileTime();
+ }
+} \ No newline at end of file