easyfs

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyDir

func CopyDir(src string, dst string, srcFs fs.FS, dstFs billy.Filesystem) error

func CopyFile

func CopyFile(src, dst string, srcFs fs.FS, dstFs billy.Filesystem) error

Types

type File

type File struct {
	Name      string `json:"name"`
	Path      string `json:"path"` // full path
	DirPath   string `json:"dir_path"`
	IsDir     bool   `json:"is_dir"`
	CreatedAt int64  `json:"created_at"`
	ModifyAt  int64  `json:"modify_at"`
	Body      string `json:"body"`
}

func GetFile

func GetFile(fs stdFs.FS, path string) (fi *File, err error)

type FileTree

type FileTree struct {
	File
	Items []FileTree `json:"items"`
}

func GetFileTree

func GetFileTree(fs stdFs.FS, base string, deep int) (ft FileTree, err error)

Jump to

Keyboard shortcuts

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