scan

package
v1.48.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2019 License: MIT Imports: 5 Imported by: 0

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

func Scan

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

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

Types

type Dir

type Dir struct {
	// contains filtered or unexported fields
}

Dir represents a directory found in the remote

func (*Dir) Attr

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

Attr returns the size and count for the directory

func (*Dir) AttrI

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

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

Entries returns a copy of the entries in the directory

func (*Dir) GetDir

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

func (d *Dir) Parent() *Dir

Parent returns the directory above this one

func (*Dir) Path

func (d *Dir) Path() string

Path returns the position of the dir in the filesystem

func (*Dir) Remove added in v1.46.0

func (d *Dir) Remove(i int)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL