Nexus: Index | Files

package internal

import ""

Package internal provides internal assets for the NodeManager


Package Files

doc.go scripts.go


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)
var FileIpfsInternalIpfsStartSh = []byte("" /* 5734 byte string literal not displayed */)

FileIpfsInternalIpfsStartSh is "ipfs/internal/"

func ReadFile Uses

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

ReadFile is adapTed from ioutil

func WalkDirs Uses

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 Uses

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

WriteFile is adapTed from ioutil

type HTTPFS Uses

type HTTPFS struct {
    // Prefix allows to limit the path of all requests. F.e. a prefix "css" would allow only calls to /css/*
    Prefix string

HTTPFS implements http.FileSystem

func (*HTTPFS) Open Uses

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

Open a file

Package internal imports 7 packages (graph) and is imported by 2 packages. Updated 2019-03-04. Refresh now. Tools for package owners.