func doEntry(f *os.File, e record.DirectoryEntry, cur *Directory) error { if _, err := f.Seek(int64(e.Offset), 0); err != nil { return err } h, err := record.Header(f) if err != nil { return err } h.Offset = e.Offset + uint64(h.ByteLength()) return doHeader(f, h, cur, e.Timestamp) }
func doEntry(e record.DirectoryEntry, f *os.File, path string) []byte { if _, err := f.Seek(int64(e.Offset), 0); err != nil { fatalf("Cannot seek to %d: %s", e.Offset, err) } h, err := record.Header(f) if err != nil { fatalf("Cannot read header from %d: %s", e.Offset, err) } h.Offset = e.Offset + uint64(h.ByteLength()) return doHeader(h, f, path) }