Documentation ¶
Index ¶
- func Closes[E io.Closer](cs []E) error
- func CopyFile(src, dst string, false_in_exist bool) error
- func Create(name string, perm os.FileMode) (*os.File, error)
- func FileSystemCopy(fs embed.FS, name string, copyto string) (int64, error)
- func IsCharDevice(pathname string) bool
- func IsDevice(pathname string) bool
- func IsDir(pathname string) bool
- func IsFIFO(pathname string) bool
- func IsFile(pathname string) bool
- func IsLink(pathname string) bool
- func IsPipe(pathname string) bool
- func IsSocket(pathname string) bool
- func OpenFile(name string, flag int, perm os.FileMode) (*os.File, error)
- func PathCanCreate(pathname string) string
- func PathExists(pathname string) bool
- func WriteJson(fn string, m map[string]interface{}) error
- func Writes[E io.Writer](ws []E, p []byte) (int, error)
- type Closers
- type RingStream
- func (b *RingStream) Len() int
- func (b *RingStream) Read(buf []byte) (int, error)
- func (b *RingStream) ReadBytes(n int, cb func([]byte)) (int, error)
- func (b *RingStream) TryReadBytes(n int, cb func([]byte)) int
- func (b *RingStream) TryWrite(p []byte) (int, error)
- func (b *RingStream) Write(p []byte) (int, error)
- type WriteClosers
- type Writers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyFile ¶ added in v0.2.1
复制文件 src:源文件 dst:目标文件或复制到的目录 false_in_exist:true表示存在就返回失败,false表示存在存在则替换 return os.PathError
func FileSystemCopy ¶ added in v0.2.5
func IsCharDevice ¶ added in v0.2.3
func PathCanCreate ¶ added in v0.2.3
func PathExists ¶
Types ¶
type RingStream ¶ added in v0.2.0
func NewRingStream ¶ added in v0.2.0
func NewRingStream(size int) *RingStream
func (*RingStream) Len ¶ added in v0.2.0
func (b *RingStream) Len() int
func (*RingStream) ReadBytes ¶ added in v0.2.0
func (b *RingStream) ReadBytes(n int, cb func([]byte)) (int, error)
如果n<=0,全部读取
func (*RingStream) TryReadBytes ¶ added in v0.2.0
func (b *RingStream) TryReadBytes(n int, cb func([]byte)) int
如果n<=0,全部读取
type WriteClosers ¶ added in v0.2.5
type WriteClosers []io.WriteCloser
func (WriteClosers) Close ¶ added in v0.2.5
func (x WriteClosers) Close() error
func (WriteClosers) WriteByte ¶ added in v0.2.5
func (x WriteClosers) WriteByte(c byte) error
func (WriteClosers) WriteString ¶ added in v0.2.5
func (x WriteClosers) WriteString(s string) (int, error)
Click to show internal directories.
Click to hide internal directories.