aboutsummaryrefslogtreecommitdiff
path: root/hotline/field.go
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2021-07-31 21:05:43 -0700
committerJeff Halter <868228+jhalter@users.noreply.github.com>2021-07-31 21:05:43 -0700
commit43ecc0f42eaeface5f640479df7372bfb8021f23 (patch)
tree58d9d09998070551a5c93867a9342c2ac4d64243 /hotline/field.go
parent625b0580010c7fbf183c53e388ceba8356df76f4 (diff)
First pass at file browsing
Diffstat (limited to 'hotline/field.go')
-rw-r--r--hotline/field.go31
1 files changed, 0 insertions, 31 deletions
diff --git a/hotline/field.go b/hotline/field.go
index 161a9b2..b057be3 100644
--- a/hotline/field.go
+++ b/hotline/field.go
@@ -87,34 +87,3 @@ func NewField(id uint16, data []byte) Field {
func (f Field) Payload() []byte {
return concat.Slices(f.ID, f.FieldSize, f.Data)
}
-
-type FileNameWithInfo struct {
- Type string // file type code
- Creator []byte // File creator code
- FileSize uint32 // File Size in bytes
- NameScript []byte // TODO: What is this?
- NameSize []byte // Length of name field
- Name string // File name
-}
-
-func (f FileNameWithInfo) Payload() []byte {
- name := []byte(f.Name)
- nameSize := make([]byte, 2)
- binary.BigEndian.PutUint16(nameSize, uint16(len(name)))
-
- kb := f.FileSize
-
- fSize := make([]byte, 4)
- binary.BigEndian.PutUint32(fSize, kb)
-
- return concat.Slices(
- []byte(f.Type),
- f.Creator,
- fSize,
- []byte{0, 0, 0, 0},
- f.NameScript,
- nameSize,
- []byte(f.Name),
- )
-
-}