package domain

import (
	"io"
	"time"
)

type Static struct {
	modTime    time.Time
	readSeeker io.ReadSeeker
	name       string
}

func NewStatic(rs io.ReadSeeker, modTime time.Time, name string) *Static {
	return &Static{
		name:       name,
		modTime:    modTime,
		readSeeker: rs,
	}
}

func (s Static) Name() string {
	return s.name
}

func (s Static) ModTime() time.Time {
	return s.modTime
}

func (s *Static) Read(p []byte) (int, error) {
	return s.readSeeker.Read(p)
}

func (s *Static) Seek(offset int64, whence int) (int64, error) {
	return s.readSeeker.Seek(offset, whence)
}
