Documentation ¶
Overview ¶
Package fileinfo extracts and stores basic metadata about a file.
Index ¶
- type Fileinfo
- func (i *Fileinfo) Basename() string
- func (i *Fileinfo) Close() error
- func (i *Fileinfo) FirstBytes() (bytes string, err error)
- func (i *Fileinfo) Hash() (hash string, err error)
- func (i *Fileinfo) LastBytes() (bytes string, err error)
- func (i *Fileinfo) Name() string
- func (i *Fileinfo) Size() int64
- func (i *Fileinfo) Type() (typ string, err error)
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fileinfo ¶
type Fileinfo struct {
// contains filtered or unexported fields
}
Fileinfo extracts information about the passed file.
func (*Fileinfo) FirstBytes ¶
FirstBytes returns the first 32 bytes of a file, base64 encoded.
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage saves information about a file in a SQLite database.
func NewStorage ¶
NewStorage returns a *Storage with an initialized SQLite database and open connection to it.
Click to show internal directories.
Click to hide internal directories.