Documentation ¶
Index ¶
- Variables
- type TextFile
- func (t *TextFile) Archive() bool
- func (t *TextFile) Exist(dir *directories.Dir) (bool, error)
- func (t *TextFile) Extract(dir *directories.Dir) error
- func (t *TextFile) ExtractedImgs(dir string) error
- func (t *TextFile) String() string
- func (t *TextFile) TextPng(c int, dir string) error
- func (t *TextFile) WebP(c int, imgDir string) (int, error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type TextFile ¶
type TextFile struct { ID uint // MySQL auto increment Id. UUID string // Unique Id. Name string // Filename. Ext string // File extension. Platform string // Platform classification of the file. Size int // Size of the file in bytes. NoReadme sql.NullBool // Disable the display of a readme on the site. Readme sql.NullString // Filename of a readme or NFO textfile to display on the site. }
TextFile is a text file object.
func (*TextFile) Exist ¶
func (t *TextFile) Exist(dir *directories.Dir) (bool, error)
Exist checks that [UUID].png exists in both thumbnail subdirectories.
func (*TextFile) Extract ¶
func (t *TextFile) Extract(dir *directories.Dir) error
Extract a textfile readme from an archive.
func (*TextFile) ExtractedImgs ¶
ExtractedImgs generates PNG and Webp image assets from a textfile extracted from an archive.
Click to show internal directories.
Click to hide internal directories.