Documentation ¶
Overview ¶
Package scan does concurrent scanning of an Fs building up a directory tree.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Attrs ¶ added in v1.59.0
type Attrs struct { Size int64 Count int64 CountUnknownSize int64 IsDir bool Readable bool EntriesHaveErrors bool }
Attrs contains accumulated properties for a directory entry
Files with unknown size are counted separately but also included in the total count. They are not included in the size, i.e. treated as empty files, which means the size may be underestimated.
func (*Attrs) AverageSize ¶ added in v1.59.0
AverageSize calculates average size of files in directory
If there are files with unknown size, this returns the average over files with known sizes, which means it may be under- or overestimated.
type Dir ¶
type Dir struct {
// contains filtered or unexported fields
}
Dir represents a directory found in the remote
func (*Dir) Entries ¶
func (d *Dir) Entries() fs.DirEntries
Entries returns a copy of the entries in the directory
func (*Dir) GetDir ¶
GetDir returns the Dir of the i-th entry
returns nil if it is a file returns a flag as to whether is directory or not