I can now read the entire directory structure.

This commit is contained in:
Caleb Gardner
2020-11-19 13:27:13 -06:00
parent d43ed54874
commit 33af16071d
6 changed files with 67 additions and 16 deletions
+4 -2
View File
@@ -23,8 +23,9 @@ type EntryInit struct {
//Entry is an entry in a directory.
type Entry struct {
Init EntryInit
Name string
Init EntryInit
Name string
Header *Header
}
//NewEntry creates a new directory entry
@@ -85,6 +86,7 @@ func NewDirectory(base io.Reader, size uint16) (*Directory, error) {
if err != nil {
return nil, err
}
ent.Header = &dir.Headers[len(dir.Headers)-1]
dir.Entries = append(dir.Entries, ent)
}
}