nfs

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: MIT Imports: 17 Imported by: 22

Documentation

Index

Constants

View Source
const (
	CAT_CONTENT = "cat_content"

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

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

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

	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,action,link"
	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"
	FROM    = "from"
)
View Source
const CAT = "cat"
View Source
const COPY = "copy"
View Source
const DEFS = "defs"
View Source
const DIR = "dir"
View Source
const FIND = "find"
View Source
const GREP = "grep"
View Source
const LINK = "link"
View Source
const LOAD = "load"
View Source
const PACK = "pack"
View Source
const PUSH = "push"
View Source
const SAVE = "save"
View Source
const TAIL = "tail"
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 *ice.Message, p string) (io.ReadWriteCloser, string, error)

func CloseFile added in v1.3.0

func CloseFile(m *ice.Message, p ice.Any)

func CopyFile added in v1.3.0

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

func CreateFile added in v1.2.9

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

func Dir

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

func ExistsFile added in v1.2.9

func ExistsFile(m Message, p string) bool
func Link(m *ice.Message, oldname string, newname string) error

func MkdirAll added in v0.9.9

func MkdirAll(m *ice.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 ReadDir added in v1.2.9

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

func ReadFile added in v1.2.9

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

func Remove added in v1.2.9

func Remove(m *ice.Message, p string) error

func RemoveAll added in v1.2.9

func RemoveAll(m *ice.Message, p string) error

func Rename added in v1.2.9

func Rename(m *ice.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 *ice.Message, oldname string, newname string) error

func WriteFile added in v1.2.9

func WriteFile(m *ice.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