dir

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dir

type Dir struct {
	DirName string   `json:"dir_name"`
	Files   []string `json:"files"`
	Dirs    []*Dir   `json:"dirs"`
}

func NewDir

func NewDir() *Dir

强行指定初始化,防止json之后,Dirs和Files为null

func (*Dir) Dump

func (dir *Dir) Dump(outPath string) (string, error)

导出到文件中

func (*Dir) Dumps

func (dir *Dir) Dumps() ([]byte, error)

func (*Dir) HasFile

func (dir *Dir) HasFile() bool

递归探测文件夹中是否有文件

func (*Dir) Load

func (dir *Dir) Load(fileContent []byte) error

func (*Dir) MakeNetDir

func (dir *Dir) MakeNetDir(pid string) string

创建新的文件夹

Jump to

Keyboard shortcuts

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