Browse Source

Fix Filestystem missing implementation

ShiroSmith 7 years ago
parent
commit
69bc91275e

+ 4 - 0
hxd/fmt/pak/FileSystem.hx

@@ -267,4 +267,8 @@ class FileSystem implements hxd.fs.FileSystem {
 		return dict.exists(path);
 		return dict.exists(path);
 	}
 	}
 
 
+	public function dir( path : String ) : Array<FileEntry> {
+		throw "Not Supported";
+	}
+
 }
 }

+ 1 - 1
hxd/fs/LocalFileSystem.hx

@@ -595,7 +595,7 @@ class LocalFileSystem implements FileSystem {
 	public function dispose() {
 	public function dispose() {
 	}
 	}
 
 
-	public function dir( path : String ) : Array<hxd.res.Any> {
+	public function dir( path : String ) :  Array<FileEntry> {
 		return null;
 		return null;
 	}
 	}
 }
 }

+ 4 - 0
hxd/fs/MultiFileSystem.hx

@@ -106,4 +106,8 @@ class MultiFileSystem implements FileSystem {
 			f.dispose();
 			f.dispose();
 	}
 	}
 
 
+	public function dir( path : String ) : Array<FileEntry> {
+		throw "Not Supported";
+	}
+
 }
 }

+ 5 - 5
hxd/prefab/ContextShared.hx

@@ -47,23 +47,23 @@ class ContextShared {
 		return ret;
 		return ret;
 	}
 	}
 
 
-	public function loadDir(p : hide.prefab.Prefab, ?dir : String ) : Array<hxd.res.Any> {
+	public function loadDir(p : String, ?dir : String ) : Array<hxd.res.Any> {
 		var datPath = new haxe.io.Path(currentPath);
 		var datPath = new haxe.io.Path(currentPath);
 		datPath.ext = "dat";
 		datPath.ext = "dat";
-		var path = datPath.toString() + "/" + p.name;
+		var path = datPath.toString() + "/" + p;
 		if(dir != null) path += "/" + dir;
 		if(dir != null) path += "/" + dir;
 		return try hxd.res.Loader.currentInstance.dir(path) catch( e : hxd.res.NotFound ) null;
 		return try hxd.res.Loader.currentInstance.dir(path) catch( e : hxd.res.NotFound ) null;
 	}
 	}
 
 
-	public function loadPrefabDat(file : String, ext : String, p : hide.prefab.Prefab) : hxd.res.Any {
+	public function loadPrefabDat(file : String, ext : String, p : String) : hxd.res.Any {
 		var datPath = new haxe.io.Path(currentPath);
 		var datPath = new haxe.io.Path(currentPath);
 		datPath.ext = "dat";
 		datPath.ext = "dat";
-		var path = new haxe.io.Path(datPath.toString() + "/" + p.name + "/" + file);
+		var path = new haxe.io.Path(datPath.toString() + "/" + p + "/" + file);
 		path.ext = ext;
 		path.ext = ext;
 		return try hxd.res.Loader.currentInstance.load(path.toString()) catch( e : hxd.res.NotFound ) null;
 		return try hxd.res.Loader.currentInstance.load(path.toString()) catch( e : hxd.res.NotFound ) null;
 	}
 	}
 
 
-	public function savePrefabDat(file : String, ext : String, p : hide.prefab.Prefab, bytes : haxe.io.Bytes ) {
+	public function savePrefabDat(file : String, ext : String, p : String, bytes : haxe.io.Bytes ) {
 		throw "Not implemented";
 		throw "Not implemented";
 	}
 	}