directory

package
v0.0.0-...-da116bd Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2015 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDirectory

func NewDirectory() dir.Directory

NewDirectory returns a new Directory

Types

type Directory

type Directory struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Directory is an implementation of dir.Directory

func CreateDirectory

func CreateDirectory(d dir.Directory, name string) *Directory

CreateDirectory creates a sub-Directory of the provided Directory

func (*Directory) Ancestry

func (d *Directory) Ancestry() []dir.Directory

Ancestry returns a slice of this Directory's ancestors plus self

func (*Directory) AttachDirectory

func (d *Directory) AttachDirectory(dirIn dir.Directory) error

AttachDirectory adds a dir.Directory to this Directory You likely would use the .Create() or .CreateDirectory() method instead, if available.

func (*Directory) AttachFile

func (d *Directory) AttachFile(f dir.File) error

AttachFile adds a dir.File to this Directory If your File has a .Create() method, you might use that instead.

func (*Directory) CreateDirectory

func (d *Directory) CreateDirectory(name string) *Directory

CreateDirectory creates a sub-Directory on the receiver Directory

func (*Directory) Delete

func (d *Directory) Delete() error

Delete deletes the Directory

func (*Directory) DetachDirectory

func (d *Directory) DetachDirectory(dirIn dir.Directory) error

DetachDirectory removes a dir.Directory from this Directory This is intended to be called from the target Directory's .Delete() method itself. This does not test that the Directory is ready to be deleted, whatever that means (is empty, etc).

func (*Directory) DetachFile

func (d *Directory) DetachFile(f dir.File) error

DetachFile removes a dir.File from this Directory This is intended to be called from the target File's .Delete() method itself. This does not test that the File is ready to be deleted, whatever that means.

func (*Directory) FindDirectories

func (d *Directory) FindDirectories(search *regexp.Regexp, recurseLevel int) ([]dir.Directory, error)

FindDirectories searches for one or more dir.Directory entries, recursively starting at this Directory

func (*Directory) FindFiles

func (d *Directory) FindFiles(search *regexp.Regexp, recurseLevel int) ([]dir.File, error)

FindFiles searches for one or more File entries, recursively starting at the Directory

func (*Directory) IsRoot

func (d *Directory) IsRoot() bool

IsRoot returns bool if this Directory is the root

func (*Directory) Name

func (d *Directory) Name() string

Name returns the Directory's name

func (*Directory) Owner

func (d *Directory) Owner() dir.User

Owner returns the owner's User

func (*Directory) Parent

func (d *Directory) Parent() dir.Directory

Parent returns the parent's Directory

func (*Directory) Rename

func (d *Directory) Rename(name string) error

Rename changes the Directory's name

func (*Directory) Root

func (d *Directory) Root() dir.Directory

Root returns the root Directory

func (*Directory) SetOwner

func (d *Directory) SetOwner(owner dir.User) error

SetOwner changes the Directory's owner

func (*Directory) SetRoot

func (d *Directory) SetRoot(root dir.Directory) error

SetRoot sets/replaces the root dir.Directory for this Directory This must only be called from method PlaceDirectory() on an implementation of dir.Directory.

func (*Directory) String

func (d *Directory) String() string

func (*Directory) UUID

func (d *Directory) UUID() uuid.UUID

UUID returns the Directory's UUID

Jump to

Keyboard shortcuts

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