File: directory.go

package info (click to toggle)
golang-github-mitchellh-go-fs 0.0~git20150611.0.a34c1b9-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 160 kB
  • ctags: 141
  • sloc: makefile: 2
file content (18 lines) | stat: -rw-r--r-- 489 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package fs

// Directory is an entry in a filesystem that stores files.
type Directory interface {
	Entry(name string) DirectoryEntry
	Entries() []DirectoryEntry
	AddDirectory(name string) (DirectoryEntry, error)
	AddFile(name string) (DirectoryEntry, error)
}

// DirectoryEntry represents a single entry within a directory,
// which can be either another Directory or a File.
type DirectoryEntry interface {
	Name() string
	IsDir() bool
	Dir() (Directory, error)
	File() (File, error)
}