rclone: github.com/ncw/rclone/cmd/ncdu/scan Index | Files

package scan

import "github.com/ncw/rclone/cmd/ncdu/scan"

Package scan does concurrent scanning of an Fs building up a directory tree.


Package Files


func Scan Uses

func Scan(ctx context.Context, f fs.Fs) (chan *Dir, chan error, chan struct{})

Scan the Fs passed in, returning a root directory channel and an error channel

type Dir Uses

type Dir struct {
    // contains filtered or unexported fields

Dir represents a directory found in the remote

func (*Dir) Attr Uses

func (d *Dir) Attr() (size int64, count int64)

Attr returns the size and count for the directory

func (*Dir) AttrI Uses

func (d *Dir) AttrI(i int) (size int64, count int64, isDir bool, readable bool)

AttrI returns the size, count and flags for the i-th directory entry

func (*Dir) Entries Uses

func (d *Dir) Entries() fs.DirEntries

Entries returns a copy of the entries in the directory

func (*Dir) GetDir Uses

func (d *Dir) GetDir(i int) (subDir *Dir, isDir bool)

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

func (*Dir) Parent Uses

func (d *Dir) Parent() *Dir

Parent returns the directory above this one

func (*Dir) Path Uses

func (d *Dir) Path() string

Path returns the position of the dir in the filesystem

func (*Dir) Remove Uses

func (d *Dir) Remove(i int)

Remove removes the i-th entry from the in-memory representation of the remote directory

Package scan imports 6 packages (graph) and is imported by 7 packages. Updated 2019-08-20. Refresh now. Tools for package owners.