package os
import "github.com/gohugoio/hugo/tpl/os"
Index ¶
Types ¶
type Namespace ¶
type Namespace struct {
// contains filtered or unexported fields
}
Namespace provides template functions for the "os" namespace.
func New ¶
New returns a new instance of the os-namespaced template functions.
func (*Namespace) Getenv ¶
Getenv retrieves the value of the environment variable named by the key. It returns the value, which will be empty if the variable is not present.
func (*Namespace) ReadDir ¶
ReadDir lists the directory contents relative to the configured WorkingDir.
func (*Namespace) ReadFile ¶
ReadFilereads the file named by filename relative to the configured WorkingDir. It returns the contents as a string. There is a upper size limit set at 1 megabytes.
Source Files ¶
- Version
- v0.25.1
- Published
- Jul 10, 2017
- Platform
- darwin/amd64
- Imports
- 7 packages
- Last checked
- 30 minutes ago –
Tools for package owners.