Przeglądaj źródła

added FileEntry.readFull

Nicolas Cannasse 3 lat temu
rodzic
commit
54e130a65c
1 zmienionych plików z 5 dodań i 1 usunięć
  1. 5 1
      hxd/fs/FileEntry.hx

+ 5 - 1
hxd/fs/FileEntry.hx

@@ -27,9 +27,13 @@ class FileEntry {
 			bytes = haxe.io.Bytes.alloc(allocSize);
 			TMP_BYTES = bytes;
 		}
+		readFull(bytes,pos,len);
+		return bytes;
+	}
+
+	public function readFull( bytes, pos, len ) {
 		if( readBytes(bytes,0,pos,len) < len )
 			throw new haxe.io.Eof();
-		return bytes;
 	}
 
 	public function getText() return getBytes().toString();