aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/File.h
diff options
context:
space:
mode:
authordaoge_cmd <3523206925@qq.com>2026-03-01 12:16:08 +0800
committerdaoge_cmd <3523206925@qq.com>2026-03-01 12:16:08 +0800
commitb691c43c44ff180d10e7d4a9afc83b98551ff586 (patch)
tree3e9849222cbc6ba49f2f1fc6e5fe7179632c7390 /Minecraft.World/File.h
parentdef8cb415354ac390b7e89052a50605285f1aca9 (diff)
Initial commit
Diffstat (limited to 'Minecraft.World/File.h')
-rw-r--r--Minecraft.World/File.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/Minecraft.World/File.h b/Minecraft.World/File.h
new file mode 100644
index 00000000..0b710cd4
--- /dev/null
+++ b/Minecraft.World/File.h
@@ -0,0 +1,56 @@
+#pragma once
+using namespace std;
+// 4J Stu - Represents java standard library class
+
+class FileFilter;
+
+class File
+{
+public:
+ //The system-dependent path-separator character
+ static const wchar_t pathSeparator;
+
+ // 4J Jev, the start of the file root
+ static const wstring pathRoot;
+
+ File() { m_abstractPathName = L""; }
+
+ File( const File &parent, const wstring& child );
+ File( const wstring& pathname );
+ File( const wstring& parent, const wstring& child );
+ bool _delete();
+ bool mkdir() const;
+ bool mkdirs() const;
+ bool exists() const;
+ bool isFile() const;
+ bool renameTo(File dest);
+ vector<File *> *listFiles() const; // Array
+ vector<File *> *listFiles(FileFilter *filter) const;
+ bool isDirectory() const;
+ __int64 length();
+ __int64 lastModified();
+ const wstring getPath() const; // 4J Jev: TODO
+ wstring getName() const;
+
+ static int hash_fnct(const File &k);
+ static bool eq_test(const File &x, const File &y);
+
+private:
+ void _init();
+ wstring m_abstractPathName;
+
+ // 4J Jev, just helper functions, change between paths and vector<string>
+ //File(vector<wstring> *path);
+};
+
+typedef struct
+{
+ int operator() (const File &k) const { return File::hash_fnct(k); }
+
+} FileKeyHash;
+
+typedef struct
+{
+ bool operator() (const File &x, const File &y) const {return File::eq_test(x,y); }
+
+} FileKeyEq; \ No newline at end of file