mirror of
https://github.com/safing/portmaster
synced 2025-09-02 02:29:12 +00:00
46 lines
934 B
Go
46 lines
934 B
Go
package updates
|
|
|
|
// File represents a file from the update system.
|
|
type File struct {
|
|
filepath string
|
|
version string
|
|
stable bool
|
|
}
|
|
|
|
func NewFile(filepath string, version string, stable bool) *File {
|
|
return &File{
|
|
filepath: filepath,
|
|
version: version,
|
|
stable: stable,
|
|
}
|
|
}
|
|
|
|
// Path returns the filepath of the file.
|
|
func (f *File) Path() string {
|
|
return f.filepath
|
|
}
|
|
|
|
// Version returns the version of the file.
|
|
func (f *File) Version() string {
|
|
return f.version
|
|
}
|
|
|
|
// Stable returns whether the file is from a stable release.
|
|
func (f *File) Stable() bool {
|
|
return f.stable
|
|
}
|
|
|
|
// Open opens the file and returns the
|
|
func (f *File) Open() {
|
|
|
|
}
|
|
|
|
// ReportError reports an error back to Safing. This will not automatically blacklist the file.
|
|
func (f *File) ReportError() {
|
|
|
|
}
|
|
|
|
// Blacklist notifies the update system that this file is somehow broken, and should be ignored from now on.
|
|
func (f *File) Blacklist() {
|
|
|
|
}
|