Bläddra i källkod

Re-add LocalFileSystem.dir() on nodejs

trethaller 6 år sedan
förälder
incheckning
1c64565bd9
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      hxd/fs/LocalFileSystem.hx

+ 1 - 1
hxd/fs/LocalFileSystem.hx

@@ -552,7 +552,7 @@ class LocalFileSystem implements FileSystem {
 	}
 	}
 
 
 	public function dir( path : String ) : Array<FileEntry> {
 	public function dir( path : String ) : Array<FileEntry> {
-		#if sys
+		#if (sys || nodejs)
 		if( !sys.FileSystem.exists(baseDir + path) || !sys.FileSystem.isDirectory(baseDir + path) )
 		if( !sys.FileSystem.exists(baseDir + path) || !sys.FileSystem.isDirectory(baseDir + path) )
 			throw new NotFound(baseDir + path);
 			throw new NotFound(baseDir + path);
 		var files = sys.FileSystem.readDirectory(baseDir + path);
 		var files = sys.FileSystem.readDirectory(baseDir + path);