浏览代码

Fix Filestystem missing implementation

ShiroSmith 7 年之前
父节点
当前提交
69bc91275e
共有 4 个文件被更改,包括 14 次插入6 次删除
  1. 4 0
      hxd/fmt/pak/FileSystem.hx
  2. 1 1
      hxd/fs/LocalFileSystem.hx
  3. 4 0
      hxd/fs/MultiFileSystem.hx
  4. 5 5
      hxd/prefab/ContextShared.hx

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

@@ -267,4 +267,8 @@ class FileSystem implements hxd.fs.FileSystem {
 		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 dir( path : String ) : Array<hxd.res.Any> {
+	public function dir( path : String ) :  Array<FileEntry> {
 		return null;
 	}
 }

+ 4 - 0
hxd/fs/MultiFileSystem.hx

@@ -106,4 +106,8 @@ class MultiFileSystem implements FileSystem {
 			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;
 	}
 
-	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);
 		datPath.ext = "dat";
-		var path = datPath.toString() + "/" + p.name;
+		var path = datPath.toString() + "/" + p;
 		if(dir != null) path += "/" + dir;
 		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);
 		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;
 		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";
 	}