5 "github.com/jhalter/mobius/concat"
8 // FileNameWithInfo field content is presented in this structure:
9 // Type 4 Folder (‘fldr’) or other
16 type FileNameWithInfo struct {
17 Type []byte // file type code
18 Creator []byte // File creator code
19 FileSize []byte // File Size in bytes
21 NameScript []byte // TODO: What is this?
22 NameSize []byte // Length of name field
23 Name []byte // File name
26 func (f FileNameWithInfo) Payload() []byte {
28 nameSize := make([]byte, 2)
29 binary.BigEndian.PutUint16(nameSize, uint16(len(name)))
42 func (f *FileNameWithInfo) Read(p []byte) (n int, err error) {
43 // TODO: check p for expected len
48 f.NameScript = p[16:18]