browser

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2017 License: MPL-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dir

type Dir struct {
	Path     string `json:"path"`
	Parent   string `json:"parent"`
	Contents []Item `json:"contents"`
}

Dir is directory struct.

func ScanDir

func ScanDir(path string) (Dir, error)

ScanDir scans given directory and returns Dir struct.

type Item

type Item struct {
	Name string   `json:"name"`
	Path string   `json:"path"`
	Size int      `json:"size"`
	Type ItemType `json:"type"`
}

Item is file or directory struct.

type ItemType

type ItemType int

ItemType defines type of Item.

const (
	// ItemFile represents regular file item
	ItemFile ItemType = iota
	// ItemDir represents directory item
	ItemDir
)

Jump to

Keyboard shortcuts

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