wikiio

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2014 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotExist = errors.New("file not exist")
	ErrNotFound = errors.New("file not found")
)

Functions

func BuildIndex

func BuildIndex()

must be called after setting.WikiRoot is set

func CloseWatcher added in v0.4.0

func CloseWatcher()

func Create

func Create(wpath string) error

func InitWatcher added in v0.4.0

func InitWatcher()

func Rename

func Rename(oldpath string, newpath string) error

Types

type WikiFile

type WikiFile struct {
	// contains filtered or unexported fields
}
var (
	WikiRoot *WikiFile
)

func Load

func Load(wpath string) (*WikiFile, error)
func Search(name string) ([]*WikiFile, error)

func (*WikiFile) DirMainPage

func (f *WikiFile) DirMainPage() *WikiFile

func (*WikiFile) FilePath

func (f *WikiFile) FilePath() string

WIKIROOT/a/b/c.md

func (*WikiFile) Files

func (f *WikiFile) Files() []*WikiFile

func (*WikiFile) IsDir

func (f *WikiFile) IsDir() bool

func (*WikiFile) IsDirMainPage added in v0.4.0

func (f *WikiFile) IsDirMainPage() bool

func (*WikiFile) IsMarkdown

func (f *WikiFile) IsMarkdown() bool

func (*WikiFile) Name

func (f *WikiFile) Name() string

Base name of file (with ext)

func (*WikiFile) NameWithoutExt

func (f *WikiFile) NameWithoutExt() string

func (*WikiFile) ParentDir

func (f *WikiFile) ParentDir() *WikiFile

func (*WikiFile) Raw

func (f *WikiFile) Raw() []byte

func (*WikiFile) Remove

func (f *WikiFile) Remove() error

func (*WikiFile) RemoveAll added in v0.4.2

func (f *WikiFile) RemoveAll() error

func (*WikiFile) Save

func (f *WikiFile) Save(b []byte) error

func (*WikiFile) URLPath

func (f *WikiFile) URLPath() template.URL

URLPREFIX/a/b/c.md

func (*WikiFile) WikiPath

func (f *WikiFile) WikiPath() string

func (*WikiFile) WikiPathList added in v0.4.0

func (f *WikiFile) WikiPathList() []*WikiFile

WikiPathList returns slice of each WikiFile in wikipath (slice doesn't include urlPrefix)

Jump to

Keyboard shortcuts

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