Documentation
¶
Index ¶
- type Option
- type Source
- func (s *Source) GetFileStream(fileID string) (io.ReadCloser, error)
- func (s *Source) Info() source.SourceInfo
- func (s *Source) Size(ctx context.Context) (*source.SourceSize, error)
- func (s *Source) VolumeLabel() string
- func (s *Source) VolumeUUID() string
- func (s *Source) Walk(ctx context.Context, callback func(source.FileMeta) error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*localOptions)
Option configures a local filesystem source.
func WithExcludePatterns ¶
WithExcludePatterns sets the patterns used to exclude files and folders.
func WithSkipMode ¶
func WithSkipMode() Option
WithSkipMode disables collection of POSIX mode, uid, gid, btime, and flags.
func WithSkipXattrs ¶
func WithSkipXattrs() Option
WithSkipXattrs disables extended attribute collection.
func WithVolumeUUID ¶
WithVolumeUUID overrides the auto-detected volume UUID for the source. Use this for filesystems where UUID detection is unsupported or to explicitly tie backups to a specific snapshot lineage.
func WithXattrNamespaces ¶
WithXattrNamespaces restricts xattr collection to attributes whose name starts with one of the given prefixes (e.g. "user.", "com.apple."). An empty slice (default) collects all readable attributes.
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
Source implements Source for local filesystem.
func (*Source) GetFileStream ¶
func (s *Source) GetFileStream(fileID string) (io.ReadCloser, error)
func (*Source) Info ¶
func (s *Source) Info() source.SourceInfo
func (*Source) VolumeLabel ¶
VolumeLabel returns the detected volume label. Exported for testing.
func (*Source) VolumeUUID ¶
VolumeUUID returns the detected or overridden volume UUID. Exported for testing.