nfs

package
v1.9.32 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2024 License: MIT Imports: 22 Imported by: 25

Documentation

Index

Constants

View Source
const (
	CAT_CONTENT = "cat_content"
	CONFIGURE   = "configure"
	STDIO       = "stdio"

	TAGS   = "tags"
	MODULE = "module"
	SOURCE = "source"
	TARGET = "target"
	BINARY = "binary"
	SCRIPT = "script"
	FORMAT = "format"
	TRANS  = "trans"

	CLONE   = "clone"
	REPOS   = "repos"
	REMOTE  = "remote"
	ORIGIN  = "origin"
	COMMIT  = "commit"
	BRANCH  = "branch"
	MASTER  = "master"
	VERSION = "version"
	COMPILE = "compile"
)
View Source
const (
	HTML = ice.HTML
	CSS  = ice.CSS
	SVG  = ice.SVG
	JS   = ice.JS
	GO   = ice.GO
	SH   = ice.SH
	SHY  = ice.SHY
	CSV  = ice.CSV
	JSON = ice.JSON
	MOD  = "mod"

	PROTO = "proto"
	YAML  = "yaml"
	CONF  = "conf"
	XML   = "xml"
	YML   = "yml"
	TXT   = "txt"
	MD    = "md"
	PY    = "py"

	IMAGE = "image"
	JPEG  = "jpeg"
	JPG   = "jpg"
	PNG   = "png"
	MP4   = "mp4"
	MOV   = "mov"
	PDF   = "pdf"

	DF = ice.DF
	PS = ice.PS
	PT = ice.PT
)
View Source
const (
	PWD = "./"
	SRC = "src/"
	ETC = "etc/"
	BIN = "bin/"
	VAR = "var/"
	USR = "usr/"

	SCAN   = "scan"
	GOWORK = "gowork"

	ETC_LOCAL_SH        = "etc/local.sh"
	ETC_CERT_KEY        = "etc/cert/cert.key"
	ETC_CERT_PEM        = "etc/cert/cert.pem"
	SRC_DOCUMENT        = "src/document/"
	SRC_TEMPLATE        = ice.SRC_TEMPLATE
	USR_TOOLKITS        = ice.USR_TOOLKITS
	USR_ICEBERGS        = ice.USR_ICEBERGS
	USR_RELEASE         = ice.USR_RELEASE
	USR_PUBLISH         = ice.USR_PUBLISH
	USR_LOCAL           = ice.USR_LOCAL
	USR_LOCAL_WORK      = ice.USR_LOCAL_WORK
	USR_LOCAL_IMAGE     = "usr/local/image/"
	USR_LEARNING_PORTAL = "usr/learning/portal/"
	USR_MODULES         = "usr/node_modules/"
	USR_PACKAGE         = "usr/package.json"

	VAR_LOG_BENCH_LOG  = "var/log/bench.log"
	USR_ICONS_AVATAR   = "usr/icons/avatar.jpg"
	USR_ICONS_CONTEXTS = "usr/icons/contexts.jpg"
	USR_ICONS_ICEBERGS = "usr/icons/icebergs.png"
	USR_ICONS_VOLCANOS = "usr/icons/volcanos.png"
	USR_ICONS          = "usr/icons/"

	V               = "/v/"
	M               = "/m/"
	P               = "/p/"
	X               = "/x/"
	S               = "/s/"
	C               = "/c/"
	INTSHELL        = "/intshell/"
	VOLCANOS        = "/volcanos/"
	VOLCANOS_PLUGIN = "/volcanos/plugin/"
	REQUIRE_MODULES = "/require/modules/"
	REQUIRE_USR     = "/require/usr/"
	REQUIRE_SRC     = "/require/src/"
	REQUIRE         = "/require/"
	PLUGIN          = "/plugin/"
	SHARE_LOCAL     = "/share/local/"
	PATHNAME        = "pathname"
	FILENAME        = "filename"

	TYPE_ALL  = "all"
	TYPE_BIN  = "bin"
	TYPE_CAT  = "cat"
	TYPE_DIR  = "dir"
	TYPE_BOTH = "both"

	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,path,size,link,action"
	DIR_CLI_FIELDS = "path,size,time"

	ROOT = "root"
	TREE = "tree"
	FULL = "full"
	PATH = "path"
	FILE = "file"
	NAME = "name"
	SIZE = "size"
	LINE = "line"
)
View Source
const (
	CONTENT = "content"
	OFFSET  = "offset"
	ALIAS   = "alias"
	FROM    = "from"
	TO      = "to"
)
View Source
const (
	XZ  = "xz"
	GZ  = "gz"
	TGZ = "tgz"
)
View Source
const CAT = "cat"
View Source
const COPY = "copy"
View Source
const DEFS = "defs"
View Source
const DIR = "dir"
View Source
const DOCUMENT = "document"
View Source
const FIND = "find"
View Source
const GREP = "grep"
View Source
const HEX = "hex"
View Source
const LINK = "link"
View Source
const LOAD = "load"
View Source
const MOVE = "move"
View Source
const MOVETO = "moveto"
View Source
const NFS = "nfs"
View Source
const (
	OPENS = "opens"
)
View Source
const PACK = "pack"
View Source
const PUSH = "push"
View Source
const SAVE = "save"
View Source
const TAR = "tar"
View Source
const TEMPLATE = "template"
View Source
const TRASH = "trash"
View Source
const ZIP = "zip"

Variables

View Source
var DiskFile = file.NewDiskFile()
View Source
var DocumentPath = func(m *ice.Message, arg ...string) string {
	return path.Join(USR_LEARNING_PORTAL, m.PrefixKey(), path.Join(arg...))
}
View Source
var DocumentText = func(m *ice.Message, p string) string {
	return m.Cmdx(CAT, DocumentPath(m, path.Base(p)))
}
View Source
var ImageResize = func(m *ice.Message, p string, height, width uint) bool { return false }
View Source
var Index = &ice.Context{Name: NFS, Help: "存储模块"}
View Source
var PackFile = file.NewPackFile()
View Source
var TemplatePath = func(m *ice.Message, arg ...string) string {
	return path.Join(ice.SRC_TEMPLATE, m.PrefixKey(), path.Join(arg...))
}
View Source
var TemplateText = func(m *ice.Message, p string) string {
	return m.Cmdx(CAT, kit.Select(TemplatePath(m, path.Base(p)), m.Option("_template")))
}

Functions

func Append added in v1.5.5

func Append(m *ice.Message, p string, cb ice.Any)

func AppendFile added in v1.2.9

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

func Close added in v1.2.9

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

func Copy added in v1.5.5

func Copy(m *ice.Message, w io.Writer, r io.Reader, cb ice.Any)

func CopyFile added in v1.3.0

func CopyFile(m *ice.Message, to, from string, cb func([]byte, int) []byte)

func CopyStream added in v1.5.5

func CopyStream(m *ice.Message, to io.Writer, from io.Reader, cache, total int, cb ice.Any)

func Create added in v1.5.5

func Create(m *ice.Message, p string, cb ice.Any)

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, field 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 DirList added in v1.6.1

func DirList(m *ice.Message, arg ...string) bool

func Document added in v1.6.1

func Document(m *ice.Message, p string, arg ...ice.Any) string

func Exists added in v1.5.5

func Exists(m *ice.Message, p string, cb ...func(string)) bool

func ExistsFile added in v1.2.9

func ExistsFile(m *ice.Message, p string) bool

func IsSourceFile added in v1.4.2

func IsSourceFile(m *ice.Message, ext 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) string

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 Open added in v1.5.5

func Open(m *ice.Message, p string, cb ice.Any)

func OpenFile added in v1.2.9

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

func OptionFiles added in v1.3.0

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

func OptionLoad added in v1.3.0

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

func Pipe added in v1.5.5

func Pipe(m *ice.Message, cb ice.Any) io.WriteCloser

func Prefix added in v1.5.5

func Prefix(arg ...string) string

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 *ice.Message, p string) ([]os.FileInfo, error)

func ReadFile added in v1.2.9

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

func Relative added in v1.5.5

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

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 Rewrite added in v1.5.5

func Rewrite(m *ice.Message, p string, cb func(string) string)

func Save added in v1.5.5

func Save(m *ice.Message, w io.Writer, s string, cb ice.Any)

func ScanCSV added in v1.9.20

func ScanCSV(m *ice.Message, file string, cb func([]string), arg ...string)

func Show added in v1.5.13

func Show(m *ice.Message, file string) bool

func SplitPath added in v1.5.5

func SplitPath(m *ice.Message, p string) []string

func StatFile added in v1.2.9

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

func TarExport added in v1.4.4

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

func Temp added in v1.8.1

func Temp(m *ice.Message, cb func(p string))

func TempName added in v1.8.1

func TempName(m *ice.Message) string

func Template added in v1.5.5

func Template(m *ice.Message, p string, data ...ice.Any) string

func Trash added in v1.4.4

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

func WriteFile added in v1.2.9

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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