Documentation
¶
Overview ¶
package fileinfo provides utilities for retrieving file information on Windows systems.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Certificates ¶
type Certificates struct {
Certificates []*x509.Certificate
}
func (*Certificates) SignedBy ¶
func (c *Certificates) SignedBy(verifier string) bool
func (*Certificates) ValidAtSignedBy ¶
func (c *Certificates) ValidAtSignedBy(verifier string, at time.Time) bool
type Versions ¶
type Versions struct {
FileVersion WinFileVersion
ProductVersion WinFileVersion
}
type WinFileInfo ¶
type WinFileInfo struct {
// contains filtered or unexported fields
}
WinFileInfo represents a file on the Windows filesystem. This file must exist in the OS afero in memory cannot be used because native Windows APIs are used to retrieve file information.
func NewWinFileInfo ¶
func NewWinFileInfo(path string) (*WinFileInfo, error)
NewWinFileInfo creates a new WinFile for the given path. It returns an error if the file does not exist or if there is an error checking the file.
func (*WinFileInfo) GetCertificates ¶
func (wf *WinFileInfo) GetCertificates() (*Certificates, error)
GetCertificates retrieves the embedded certificates from the file. It returns a slice of x509.Certificate pointers or an error if the operation fails.
func (*WinFileInfo) GetFileTime ¶
func (wf *WinFileInfo) GetFileTime() (*FileTime, error)
GetFileTime retrieves the file time information for the file. It returns a WinFileTime struct containing the file time information.
func (*WinFileInfo) GetFixedFileInfo ¶
func (wf *WinFileInfo) GetFixedFileInfo() (*windows.VS_FIXEDFILEINFO, error)
GetFixedFileInfo retrieves the fixed file information for the file. It returns a windows.VS_FIXEDFILEINFO struct containing the fixed file information.
func (*WinFileInfo) GetVersions ¶
func (wf *WinFileInfo) GetVersions() (*Versions, error)
GetVersions retrieves the file version information for the file. It returns a WinFileInfo struct containing the file version information.
type WinFileVersion ¶
func (WinFileVersion) String ¶
func (f WinFileVersion) String() string