Documentation ¶
Overview ¶
Package filesystem provides a filesystem Asset and Source implementation for d2loader
Index ¶
- func OnAddSource(path string) (asset.Source, error)
- type Asset
- func (fsa *Asset) Close() error
- func (fsa *Asset) Data() ([]byte, error)
- func (fsa *Asset) Path() string
- func (fsa *Asset) Read(p []byte) (n int, err error)
- func (fsa *Asset) Seek(offset int64, whence int) (int64, error)
- func (fsa *Asset) Source() asset.Source
- func (fsa *Asset) String() string
- func (fsa *Asset) Type() types.AssetType
- type Source
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Asset ¶
type Asset struct {
// contains filtered or unexported fields
}
Asset represents an asset that is in the host filesystem
type Source ¶
type Source struct {
Root string
}
Source represents an asset source which is a normal directory on the host file system
func (*Source) Open ¶
func (s *Source) Open(subPath string) (io.ReadSeeker, error)
Open opens a file with the given sub-path within the Root dir of the file system source
func (*Source) Type ¶
func (s *Source) Type() types.SourceType
Type returns the type of this asset source
Click to show internal directories.
Click to hide internal directories.