the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 58 lines 1.3 kB view raw
1#pragma once 2 3#include <cstdint> 4#include <vector> 5#include <string> 6 7// 4J Stu - Represents java standard library class 8 9class FileFilter; 10 11class File 12{ 13public: 14 //The system-dependent path-separator character 15 static const wchar_t pathSeparator; 16 17 // 4J Jev, the start of the file root 18 static const wstring pathRoot; 19 20 File() { m_abstractPathName = L""; } 21 22 File( const File &parent, const wstring& child ); 23 File( const wstring& pathname ); 24 File( const wstring& parent, const wstring& child ); 25 bool _delete(); 26 bool mkdir() const; 27 bool mkdirs() const; 28 bool exists() const; 29 bool isFile() const; 30 bool renameTo(File dest); 31 std::vector<File *> *listFiles() const; // Array 32 std::vector<File *> *listFiles(FileFilter *filter) const; 33 bool isDirectory() const; 34 int64_t length(); 35 int64_t lastModified(); 36 const wstring getPath() const; // 4J Jev: TODO 37 wstring getName() const; 38 39 static int hash_fnct(const File &k); 40 static bool eq_test(const File &x, const File &y); 41 42private: 43 void _init(); 44 wstring m_abstractPathName; 45 46 // 4J Jev, just helper functions, change between paths and vector<string> 47 //File(vector<wstring> *path); 48}; 49 50struct FileKeyHash 51{ 52 int operator() (const File &k) const; 53}; 54 55struct FileKeyEq 56{ 57 bool operator() (const File &x, const File &y) const; 58};