pkger – github.com/markbates/pkger Index | Files | Directories

package pkger

import "github.com/markbates/pkger"

Index

Variables

var Version = "development"

Version of pkger

Functions

func Apply

func Apply(pkg pkging.Pkger, err error) error

Apply will wrap the current implementation of pkger.Pkger with the new pkg. This allows for layering of pkging.Pkger implementations.

func Create

func Create(p string) (pkging.File, error)

Create creates the named file with mode 0666 (before umask) - It's actually 0644, truncating it if it already exists. If successful, methods on the returned File can be used for I/O; the associated file descriptor has mode O_RDWR.

func Current

func Current() (here.Info, error)

Current returns the here.Info representing the current Pkger implementation.

func Include

func Include(name string) string

Include is a no-op that directs the pkger tool to include the desired file or folder.

func Info

func Info(p string) (here.Info, error)

Info returns the here.Info of the here.Path

func MkdirAll

func MkdirAll(p string, perm os.FileMode) error

MkdirAll creates a directory named path, along with any necessary parents, and returns nil, or else returns an error. The permission bits perm (before umask) are used for all directories that MkdirAll creates. If path is already a directory, MkdirAll does nothing and returns nil.

func Open

func Open(p string) (pkging.File, error)

Open opens the named file for reading. If successful, methods on the returned file can be used for reading; the associated file descriptor has mode O_RDONLY.

func Parse

func Parse(p string) (here.Path, error)

Parse the string in here.Path format.

func Remove

func Remove(name string) error

Remove removes the named file or (empty) directory.

func RemoveAll

func RemoveAll(name string) error

RemoveAll removes path and any children it contains. It removes everything it can but returns the first error it encounters. If the path does not exist, RemoveAll returns nil (no error).

func Stat

func Stat(name string) (os.FileInfo, error)

Stat returns a FileInfo describing the named file.

func Walk

func Walk(p string, wf filepath.WalkFunc) error

Walk walks the file tree rooted at root, calling walkFn for each file or directory in the tree, including root. All errors that arise visiting files and directories are filtered by walkFn. The files are walked in lexical order, which makes the output deterministic but means that for very large directories Walk can be inefficient. Walk does not follow symbolic links. - That is from the standard library. I know. Their grammar teachers can not be happy with them right now.

Types

type Dir

type Dir string

func (Dir) Open

func (d Dir) Open(name string) (http.File, error)

Source Files

apply.go pkger.go version.go

Directories

PathSynopsis
cmd
cmd/pkger
cmd/pkger/cmds
here
internal
parser
pkging
pkging/embed
pkging/mem
pkging/pkgtest
pkging/pkgutil
pkging/stdos
Version
v0.17.1 (latest)
Published
Aug 12, 2020
Platform
js/wasm
Imports
7 packages
Last checked
now

Tools for package owners.