Documentation ¶
Index ¶
- type Checksums
- type Content
- type Detail
- func (d *Detail) Ctrls(name string) error
- func (d *Detail) Len(name string) error
- func (d *Detail) LineBreaks(r [2]rune)
- func (d *Detail) LineTotals(name string) error
- func (d *Detail) Marshal(f Format) ([]byte, error)
- func (d *Detail) MimeUnknown()
- func (d *Detail) Parse(name string, stat os.FileInfo, data ...byte) error
- func (d *Detail) Read(name string) error
- func (d *Detail) ValidText() bool
- func (d *Detail) Words(name string) error
- type Format
- type LineBreaks
- type ModDates
- type Sizes
- type Stats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checksums ¶
type Checksums struct { CRC32 string `json:"crc32" xml:"crc32"` CRC64 string `json:"crc64" xml:"crc64"` MD5 string `json:"md5" xml:"md5"` SHA256 string `json:"sha256" xml:"sha256"` }
Checksums and hashes of the file.
type Content ¶
type Content struct { Type string `json:"-" xml:"-"` Media string `json:"media" xml:"media"` Sub string `json:"subMedia" xml:"sub_media"` Commt string `json:"comment" xml:"comment"` }
Content metadata from either MIME content type and magic file data.
type Detail ¶
type Detail struct { XMLName xml.Name `json:"-" xml:"file"` Name string `json:"filename" xml:"name"` Unicode string `json:"unicode" xml:"unicode,attr"` LineBreak LineBreaks `json:"lineBreak" xml:"line_break"` Count Stats `json:"counts" xml:"counts"` Size Sizes `json:"size" xml:"size"` Lines int `json:"lines" xml:"lines"` Width int `json:"width" xml:"width"` Modified ModDates `json:"modified" xml:"last_modified"` Sums Checksums `json:"checksums" xml:"checksums"` Mime Content `json:"mime" xml:"mime"` Slug string `json:"slug" xml:"id,attr"` Sauce sauce.Record `json:"sauce" xml:"sauce"` ZipComment string `json:"zipComment" xml:"zip_comment"` UTF8 bool // contains filtered or unexported fields }
Detail of a file.
func (*Detail) LineBreaks ¶
LineBreaks determines the new lines characters found in the rune pair.
func (*Detail) LineTotals ¶
LineTotals counts the totals lines in the named file.
func (*Detail) MimeUnknown ¶
func (d *Detail) MimeUnknown()
MimeUnknown detects non-Standard legacy data.
type LineBreaks ¶
type LineBreaks struct { Abbr string `json:"string" xml:"string,attr"` Escape string `json:"escape" xml:"-"` Decimals [2]rune `json:"decimals" xml:"decimal"` }
LineBreaks for new line toggles.
type ModDates ¶
type ModDates struct { Time time.Time `json:"iso" xml:"date"` Epoch int64 `json:"epoch" xml:"epoch,attr"` }
ModDates is the file last modified dates in multiple output formats.
Click to show internal directories.
Click to hide internal directories.