Documentation
¶
Index ¶
- type ErrMap
- type FS
- func (f *FS) Abs(p path.Relative) path.Absolute
- func (f *FS) Delete(p path.Relative, recursive bool) error
- func (f *FS) Exists(p path.Relative) bool
- func (f *FS) MirrorErrs() error
- func (f *FS) ModTime(p path.Relative) (time.Time, error)
- func (f *FS) Reader(p path.Relative) (io.ReadCloser, error)
- func (f *FS) Size(p path.Relative) int64
- func (f *FS) Write(p path.Relative, rd io.ReadCloser, inbetween bool) error
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FS ¶
type FS struct {
// contains filtered or unexported fields
}
FS is a meta filesystem, that has a base filesystem for reading and writing and optional mirrors that are also written to and deleted from
func New ¶
New returns a new FS based on base. On default, the methods only return errors from the base filesystem. The mirroring errors are tracked and should be checked by calling MirrorErrs() directly after calling Write or Delete. However, if OptReturnMirrorErrs() is passed as an option, writing and deleting will also return errors from the mirroring. Errors from mirroring if not nil, can always by casted to an ErrMap, where the key is the name of the mirror fs and the value is the corresponding error.
func (*FS) MirrorErrs ¶
MirrorErrs report the errors only of mirroring