gg_fs

package
v0.2.107 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileWrapper

type FileWrapper struct {
	Uid     string `json:"uid"`
	Tag     string `json:"tag"`
	Path    string `json:"path"`
	Name    string `json:"name"`
	Ext     string `json:"ext"`
	IsDir   bool   `json:"is_dir"`
	Size    int64  `json:"size"`
	Mode    string `json:"mode"`
	ModTime int64  `json:"mod_time"`
	Bytes   []byte `json:"bytes"`
}

func NewFileWrapper

func NewFileWrapper(filename string) (instance *FileWrapper)

func (*FileWrapper) MkDir

func (instance *FileWrapper) MkDir() error

func (*FileWrapper) Read

func (instance *FileWrapper) Read() (response []byte, err error)

func (*FileWrapper) ReadDir

func (instance *FileWrapper) ReadDir() (response []*FileWrapper, err error)

func (*FileWrapper) Remove

func (instance *FileWrapper) Remove() error

func (*FileWrapper) SetTag added in v0.2.101

func (instance *FileWrapper) SetTag(tag string) *FileWrapper

func (*FileWrapper) SetUid added in v0.2.101

func (instance *FileWrapper) SetUid(uid string) *FileWrapper

func (*FileWrapper) String

func (instance *FileWrapper) String() string

func (*FileWrapper) Write

func (instance *FileWrapper) Write(bytes []byte) (size int, err error)

type FsHelper

type FsHelper struct {
}
var Fs *FsHelper

func (*FsHelper) Exists

func (instance *FsHelper) Exists(path string) (bool, error)

func (*FsHelper) MkDir

func (instance *FsHelper) MkDir(path string) error

func (*FsHelper) Read

func (instance *FsHelper) Read(filename string) (response []byte, err error)

func (*FsHelper) ReadDir

func (instance *FsHelper) ReadDir(path string) (response []*FileWrapper, err error)

func (*FsHelper) Remove

func (instance *FsHelper) Remove(source string) error

func (*FsHelper) Wrap

func (instance *FsHelper) Wrap(filename string) *FileWrapper

func (*FsHelper) Write

func (instance *FsHelper) Write(data []byte, target string) (int, error)

Jump to

Keyboard shortcuts

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