-type FlatFileInformationFork struct {
- Platform []byte // Operating System used. ("AMAC" or "MWIN")
- TypeSignature []byte // File type signature
- CreatorSignature []byte // File creator signature
- Flags []byte
- PlatformFlags []byte
- RSVD []byte
- CreateDate []byte
- ModifyDate []byte
- NameScript []byte // TODO: what is this?
- NameSize []byte // Length of file name (Maximum 128 characters)
- Name []byte // File name
- CommentSize []byte // Length of file comment
- Comment []byte // File comment
-}
-
-func NewFlatFileInformationFork(fileName string) FlatFileInformationFork {
- return FlatFileInformationFork{
- Platform: []byte("AMAC"), // TODO: Remove hardcode to support "AWIN" Platform (maybe?)
- TypeSignature: []byte(fileTypeFromFilename(fileName)), // TODO: Don't infer types from filename
- CreatorSignature: []byte(fileCreatorFromFilename(fileName)), // TODO: Don't infer types from filename
- Flags: []byte{0, 0, 0, 0}, // TODO: What is this?
- PlatformFlags: []byte{0, 0, 1, 0}, // TODO: What is this?
- RSVD: make([]byte, 32), // Unimplemented in Hotline Protocol
- CreateDate: []byte{0x07, 0x70, 0x00, 0x00, 0xba, 0x74, 0x24, 0x73}, // TODO: implement
- ModifyDate: []byte{0x07, 0x70, 0x00, 0x00, 0xba, 0x74, 0x24, 0x73}, // TODO: implement
- NameScript: make([]byte, 2), // TODO: What is this?
- Name: []byte(fileName),
- Comment: []byte("TODO"), // TODO: implement (maybe?)