weedfs

package
v1.1.10 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2025 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExistsFile

func ExistsFile(filerurl, filename string) bool

ExistsFile weed 文件是否存在

func WalkWeedDir

func WalkWeedDir(ctx context.Context, filer *goseaweedfs.Filer, rootDir string, wf WalkWeedFunc) error

WalkWeedDir 遍历 weed 文件夹

Types

type WalkWeedFunc

type WalkWeedFunc func(ctx context.Context, filer *goseaweedfs.Filer, pathStartWith string, ent *WeedFileEntry, err error) error

WalkWeedFunc 遍历 weed 文件夹

type WeedFileChunk

type WeedFileChunk struct {
	FileID string `json:"file_id"`
	Size   int64  `json:"size"`
}

WeedFileChunk weed 文件块

type WeedFileEntry

type WeedFileEntry struct {
	FullPath string          `json:"FullPath"`
	Mode     fs.FileMode     `json:"Mode"`
	Mime     string          `json:"Mime"`
	Md5      string          `json:"Md5"`
	FileSize int64           `json:"FileSize"`
	Chunks   []WeedFileChunk `json:"chunks"`
}

WeedFileEntry weed 文件

func ListWeedDirFiles

func ListWeedDirFiles(filer *goseaweedfs.Filer, rootDir string, lastFilename string) ([]*WeedFileEntry, error)

ListWeedDirFiles 获取 weed 文件夹下的文件列表

type WeedFileListResponse

type WeedFileListResponse struct {
	Path    string           `json:"Path"`
	Entries []*WeedFileEntry `json:"Entries"`
}

WeedFileListResponse weed 文件列表

Jump to

Keyboard shortcuts

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