Working on reading data.

Set up go modules
This commit is contained in:
Caleb Gardner
2020-11-20 03:59:38 -06:00
parent bc9adf8ade
commit fe0f4ef05f
7 changed files with 273 additions and 15 deletions
+2
View File
@@ -151,6 +151,7 @@ type ExtendedFileInit struct {
type ExtendedFile struct {
Init ExtendedFileInit
BlockSizes []uint32
Fragmented bool
}
//NewExtendedFile creates a new ExtendedFile
@@ -160,6 +161,7 @@ func NewExtendedFile(rdr io.Reader, blockSize uint32) (ExtendedFile, error) {
if err != nil {
return inode, err
}
inode.Fragmented = inode.Init.FragmentIndex != 0xFFFFFFFF
blocks := inode.Init.Size / blockSize
if inode.Init.Size%blockSize > 0 {
blocks++