nfs

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2023 License: MIT Imports: 19 Imported by: 25

Documentation

Index

Constants

View Source
const (
	CAT_CONTENT = "cat_content"

	STDIO  = "stdio"
	MODULE = "module"
	SOURCE = "source"
	SCRIPT = "script"
	BINARY = "binary"
	TARGET = "target"
	TAGS   = "tags"

	TEMPLATE = "template"
	VERSION  = "version"
	MASTER   = "master"
	BRANCH   = "branch"
	REMOTE   = "remote"
	ORIGIN   = "origin"
	REPOS    = "repos"
)
View Source
const (
	SVG  = ice.SVG
	HTML = ice.HTML
	CSS  = ice.CSS
	JS   = ice.JS
	GO   = ice.GO
	SH   = ice.SH
	SHY  = ice.SHY
	CSV  = ice.CSV
	JSON = ice.JSON

	PY  = "py"
	MD  = "md"
	TXT = "txt"
	XML = "xml"
	YML = "yml"
	ZML = "zml"
	IML = "iml"

	PNG = "png"
	JPG = "jpg"
	MP4 = "mp4"
	PDF = "pdf"

	PWD = "./"
	PS  = ice.PS
	PT  = ice.PT
)
View Source
const (
	TYPE_ALL  = "all"
	TYPE_CAT  = "cat"
	TYPE_DIR  = "dir"
	TYPE_BOTH = "both"
)
View Source
const (
	DIR_ROOT = "dir_root"
	DIR_TYPE = "dir_type"
	DIR_DEEP = "dir_deep"
	DIR_REG  = "dir_reg"

	DIR_DEF_FIELDS = "time,path,size,action"
	DIR_WEB_FIELDS = "time,size,path,link,action"
	DIR_CLI_FIELDS = "path,size,time"
)
View Source
const (
	ROOT = "root"
	TREE = "tree"
	FULL = "full"
	PATH = "path"
	FILE = "file"
	NAME = "name"
	SIZE = "size"
	LINE = "line"
)
View Source
const (
	CONTENT = "content"
	ALIAS   = "alias"
)
View Source
const CAT = "cat"
View Source
const COPY = "copy"
View Source
const DEFS = "defs"
View Source
const DIR = "dir"
View Source
const (
	FROM = "from"
)
View Source
const GREP = "grep"
View Source
const HEX = "hex"
View Source
const LINK = "link"
View Source
const LOAD = "load"
View Source
const NFS = "nfs"
View Source
const PACK = "pack"
View Source
const PUSH = "push"
View Source
const SAVE = "save"
View Source
const TAR = "tar"
View Source
const TRASH = "trash"

Variables

View Source
var DiskFile = file.NewDiskFile()
View Source
var Index = &ice.Context{Name: NFS, Help: "存储模块"}
View Source
var PackFile = file.NewPackFile()

Functions

func AppendFile added in v1.2.9

func AppendFile(m Message, p string) (io.ReadWriteCloser, string, error)

func CatFile added in v1.4.4

func CatFile(m *ice.Message, p string) string

func CloseFile added in v1.3.0

func CloseFile(m Message, p ice.Any)

func CopyFile added in v1.3.0

func CopyFile(m *ice.Message, to io.WriteCloser, from io.ReadCloser, bufs, total int, cb ice.Any)

func CreateFile added in v1.2.9

func CreateFile(m Message, p string) (io.WriteCloser, string, error)

func Dir

func Dir(m *ice.Message, sort string) *ice.Message

func DirDeepAll added in v1.4.3

func DirDeepAll(m *ice.Message, root, dir string, cb func(ice.Maps), arg ...string) *ice.Message

func ExistsFile added in v1.2.9

func ExistsFile(m Message, p string) bool

func IsSourceFile added in v1.4.2

func IsSourceFile(m *ice.Message, ext string) bool
func Link(m Message, oldname string, newname string) error

func MkdirAll added in v0.9.9

func MkdirAll(m Message, p string) error

func NewCloser added in v1.3.0

func NewCloser(c func() error) io.WriteCloser

func NewReadCloser added in v0.5.6

func NewReadCloser(r io.Reader) io.ReadCloser

func NewWriteCloser added in v1.2.9

func NewWriteCloser(w func([]byte) (int, error), c func() error) io.WriteCloser

func OpenFile added in v1.2.9

func OpenFile(m Message, p string) (io.ReadCloser, error)

func OptionFiles added in v1.3.0

func OptionFiles(m Message, f ...file.File) file.File

func OptionLoad added in v1.3.0

func OptionLoad(m *ice.Message, file string) *ice.Message

func ReadAll added in v1.4.4

func ReadAll(m *ice.Message, r io.Reader) []byte

func ReadDir added in v1.2.9

func ReadDir(m Message, p string) ([]os.FileInfo, error)

func ReadFile added in v1.2.9

func ReadFile(m Message, p string) ([]byte, error)

func Remove added in v1.2.9

func Remove(m Message, p string) error

func RemoveAll added in v1.2.9

func RemoveAll(m Message, p string) error

func Rename added in v1.2.9

func Rename(m Message, oldname string, newname string) error

func StatFile added in v1.2.9

func StatFile(m Message, p string) (os.FileInfo, error)
func Symlink(m Message, oldname string, newname string) error

func TarExport added in v1.4.4

func TarExport(m *ice.Message, path string, file ...string)

func Trash added in v1.4.4

func Trash(m *ice.Message, p string) *ice.Message

func WriteFile added in v1.2.9

func WriteFile(m Message, p string, b []byte) error

Types

type Message added in v1.4.0

type Message interface {
	Optionv(key string, arg ...ice.Any) ice.Any
}

Jump to

Keyboard shortcuts

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