- var ffif FlatFileInformationFork
-
- dataLen := binary.BigEndian.Uint32(ffifh.DataSize[:])
- ffifBuf := make([]byte, dataLen)
- if _, err := conn.Read(ffifBuf); err != nil {
- return err
- }
- if err := ffif.UnmarshalBinary(ffifBuf); err != nil {
- return err
- }
-
- var ffdfh FlatFileDataForkHeader
- ffdfhBuf := make([]byte, 16)
- if _, err := conn.Read(ffdfhBuf); err != nil {
- return err
- }
- err = binary.Read(bytes.NewReader(ffdfhBuf), binary.BigEndian, &ffdfh)
- if err != nil {
- return err
- }
-
- // this will be zero if the file only has a resource fork
- fileSize := int(binary.BigEndian.Uint32(ffdfh.DataSize[:]))
-