소스 검색

added FileEntry.readFull

Nicolas Cannasse 3 년 전
부모
커밋
54e130a65c
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  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();