static

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2019 License: Unlicense Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// CTX is a context for webdav vfs
	CTX = context.Background()

	// FS is a virtual memory file system
	FS = webdav.NewMemFS()

	// Handler is used to server files through a http handler
	Handler *webdav.Handler

	// HTTP is the http file system
	HTTP http.FileSystem = new(HTTPFS)
)
View Source
var FileInitBash = []byte("\x50\x52\x4f\x4d\x50\x54\x5f\x43\x4f\x4d\x4d\x41\x4e\x44\x3d\x62\x72\x6f\x6e\x7a\x65\x5f\x70\x72\x6f\x6d\x70\x74\x0a\x62\x72\x6f\x6e\x7a\x65\x5f\x70\x72\x6f\x6d\x70\x74\x28\x29\x20\x7b\x0a\x09\x50\x53\x31\x3d\x22\x24\x28\x63\x6f\x64\x65\x3d\x24\x3f\x20\x6a\x6f\x62\x73\x3d\x24\x28\x6a\x6f\x62\x73\x20\x2d\x70\x20\x7c\x20\x77\x63\x20\x2d\x6c\x29\x20\x62\x72\x6f\x6e\x7a\x65\x20\x70\x72\x69\x6e\x74\x20\x22\x24\x7b\x42\x52\x4f\x4e\x5a\x45\x5b\x40\x5d\x7d\x22\x29\x20\x22\x0a\x7d\x0a")

FileInitBash is "init.bash"

View Source
var FileInitFish = []byte("\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x66\x69\x73\x68\x5f\x70\x72\x6f\x6d\x70\x74\x3b\x20\x65\x6e\x76\x20\x63\x6f\x64\x65\x3d\x24\x73\x74\x61\x74\x75\x73\x20\x6a\x6f\x62\x73\x3d\x28\x63\x6f\x75\x6e\x74\x20\x28\x6a\x6f\x62\x73\x20\x2d\x70\x29\x29\x20\x63\x6d\x64\x74\x69\x6d\x65\x3d\x7b\x24\x43\x4d\x44\x5f\x44\x55\x52\x41\x54\x49\x4f\x4e\x7d\x6d\x73\x20\x62\x72\x6f\x6e\x7a\x65\x20\x70\x72\x69\x6e\x74\x20\x24\x42\x52\x4f\x4e\x5a\x45\x3b\x20\x65\x63\x68\x6f\x20\x2d\x6e\x20\x27\x20\x27\x3b\x20\x65\x6e\x64\x0a")

FileInitFish is "init.fish"

View Source
var FileInitZsh = []byte("\x42\x52\x4f\x4e\x5a\x45\x5f\x53\x54\x41\x52\x54\x3d\x24\x28\x64\x61\x74\x65\x20\x2b\x25\x73\x25\x33\x4e\x29\x0a\x75\x6e\x73\x65\x74\x6f\x70\x74\x20\x70\x72\x6f\x6d\x70\x74\x5f\x73\x75\x62\x73\x74\x0a\x0a\x70\x72\x65\x65\x78\x65\x63\x28\x29\x20\x7b\x0a\x09\x42\x52\x4f\x4e\x5a\x45\x5f\x53\x54\x41\x52\x54\x3d\x24\x28\x64\x61\x74\x65\x20\x2b\x25\x73\x25\x33\x4e\x29\x0a\x7d\x0a\x0a\x70\x72\x65\x63\x6d\x64\x28\x29\x20\x7b\x0a\x09\x50\x52\x4f\x4d\x50\x54\x3d\x22\x24\x28\x63\x6f\x64\x65\x3d\x24\x3f\x20\x6a\x6f\x62\x73\x3d\x24\x28\x6a\x6f\x62\x73\x20\x7c\x20\x77\x63\x20\x2d\x6c\x29\x20\x63\x6d\x64\x74\x69\x6d\x65\x3d\x24\x28\x28\x24\x28\x64\x61\x74\x65\x20\x2b\x25\x73\x25\x33\x4e\x29\x2d\x24\x42\x52\x4f\x4e\x5a\x45\x5f\x53\x54\x41\x52\x54\x29\x29\x6d\x73\x20\x62\x72\x6f\x6e\x7a\x65\x20\x70\x72\x69\x6e\x74\x20\x22\x24\x7b\x42\x52\x4f\x4e\x5a\x45\x5b\x40\x5d\x7d\x22\x29\x20\x22\x0a\x7d\x0a")

FileInitZsh is "init.zsh"

Functions

func ReadFile

func ReadFile(path string) ([]byte, error)

ReadFile is adapTed from ioutil

func WalkDirs

func WalkDirs(name string, includeDirsInList bool, files ...string) ([]string, error)

WalkDirs looks for files in the given dir and returns a list of files in it usage for all files in the b0x: WalkDirs("", false)

func WriteFile

func WriteFile(filename string, data []byte, perm os.FileMode) error

WriteFile is adapTed from ioutil

Types

type HTTPFS

type HTTPFS struct{}

HTTPFS implements http.FileSystem

func (*HTTPFS) Open

func (hfs *HTTPFS) Open(path string) (http.File, error)

Open a file

Jump to

Keyboard shortcuts

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