package hugofs

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

Package hugofs provides the file systems used by Hugo.

Index

Variables

var Os = &afero.OsFs{}

Os points to an Os Afero file system.

Types

type Fs

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

	// Destination is Hugo's destination 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

func NewDefault(cfg config.Provider) *Fs

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

func NewFrom

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

func NewMem(cfg config.Provider) *Fs

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

Source Files

fs.go

Version
v0.25.1
Published
Jul 10, 2017
Platform
darwin/amd64
Imports
2 packages
Last checked
31 minutes ago

Tools for package owners.