hugo: github.com/spf13/hugo/hugofs Index | Files

package hugofs

import "github.com/spf13/hugo/hugofs"

Package hugofs provides the file systems used by Hugo.

Index

Package Files

fs.go

Variables

var Os = &afero.OsFs{}

Os points to an Os Afero file system.

type Fs Uses

type Fs struct {
    // Source is Hugo's source file system.
    Source afero.Fs

    // Destination is Hugo's destionation file system.
    Destination afero.Fs

    // Os is an OS file system.
    Os  afero.Fs

    // WorkingDir is a read-only file system
    // restricted to the project working dir.
    WorkingDir *afero.BasePathFs
}

func NewDefault Uses

func NewDefault(cfg config.Provider) *Fs

NewDefault creates a new Fs with the OS file system as source and destination file systems.

func NewFrom Uses

func NewFrom(fs afero.Fs, cfg config.Provider) *Fs

NewFrom creates a new Fs based on the provided Afero Fs as source and destination file systems. Useful for testing.

func NewMem Uses

func NewMem(cfg config.Provider) *Fs

NewMem creates a new Fs with the MemMapFs as source and destination file systems. Useful for testing.

Package hugofs imports 2 packages (graph) and is imported by 398 packages. Updated 2017-03-09. Refresh now. Tools for package owners.