fs

package
v3.42.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2025 License: AGPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ArchiveContentUploadTaskManager = &archiveContentUploadTaskManagerType{
	Manager: nil,
}
View Source
var ArchiveDownloadTaskManager *tache.Manager[*ArchiveDownloadTask]
View Source
var CopyTaskManager *tache.Manager[*CopyTask]
View Source
var UploadTaskManager *tache.Manager[*UploadTask]

Functions

func ArchiveDecompress added in v3.42.0

func ArchiveDecompress(ctx context.Context, srcObjPath, dstDirPath string, args model.ArchiveDecompressArgs, lazyCache ...bool) (task.TaskExtensionInfo, error)

func ArchiveDriverExtract added in v3.42.0

func ArchiveDriverExtract(ctx context.Context, path string, args model.ArchiveInnerArgs) (*model.Link, model.Obj, error)

func ArchiveInternalExtract added in v3.42.0

func ArchiveInternalExtract(ctx context.Context, path string, args model.ArchiveInnerArgs) (io.ReadCloser, int64, error)

func ArchiveList added in v3.42.0

func ArchiveList(ctx context.Context, path string, args model.ArchiveListArgs) ([]model.Obj, error)

func ArchiveMeta added in v3.42.0

func ArchiveMeta(ctx context.Context, path string, args model.ArchiveMetaArgs) (*model.ArchiveMetaProvider, error)

func Copy

func Copy(ctx context.Context, srcObjPath, dstDirPath string, lazyCache ...bool) (task.TaskExtensionInfo, error)

func Get

func Get(ctx context.Context, path string, args *GetArgs) (model.Obj, error)

func GetStorage

func GetStorage(path string, args *GetStoragesArgs) (driver.Driver, error)
func Link(ctx context.Context, path string, args model.LinkArgs) (*model.Link, model.Obj, error)

func List

func List(ctx context.Context, path string, args *ListArgs) ([]model.Obj, error)

func MakeDir

func MakeDir(ctx context.Context, path string, lazyCache ...bool) error

func Move

func Move(ctx context.Context, srcPath, dstDirPath string, lazyCache ...bool) error

func Other

func Other(ctx context.Context, args model.FsOtherArgs) (interface{}, error)

func PutAsTask

func PutAsTask(ctx context.Context, dstDirPath string, file model.FileStreamer) (task.TaskExtensionInfo, error)

func PutDirectly

func PutDirectly(ctx context.Context, dstDirPath string, file model.FileStreamer, lazyCache ...bool) error

func Remove

func Remove(ctx context.Context, path string) error

func Rename

func Rename(ctx context.Context, srcPath, dstName string, lazyCache ...bool) error

func WalkFS added in v3.6.0

func WalkFS(ctx context.Context, depth int, name string, info model.Obj, walkFn func(reqPath string, info model.Obj) error) error

WalkFS traverses filesystem fs starting at name up to depth levels.

WalkFS will stop when current depth > `depth`. For each visited node, WalkFS calls walkFn. If a visited file system node is a directory and walkFn returns path.SkipDir, walkFS will skip traversal of this node.

Types

type ArchiveContentUploadTask added in v3.42.0

type ArchiveContentUploadTask struct {
	task.TaskExtension

	ObjName    string
	InPlace    bool
	FilePath   string
	DstDirPath string

	DstStorageMp string
	// contains filtered or unexported fields
}

func (*ArchiveContentUploadTask) Cancel added in v3.42.0

func (t *ArchiveContentUploadTask) Cancel()

func (*ArchiveContentUploadTask) GetName added in v3.42.0

func (t *ArchiveContentUploadTask) GetName() string

func (*ArchiveContentUploadTask) GetStatus added in v3.42.0

func (t *ArchiveContentUploadTask) GetStatus() string

func (*ArchiveContentUploadTask) Run added in v3.42.0

func (*ArchiveContentUploadTask) RunWithNextTaskCallback added in v3.42.0

func (t *ArchiveContentUploadTask) RunWithNextTaskCallback(f func(nextTsk *ArchiveContentUploadTask) error) error

type ArchiveDownloadTask added in v3.42.0

type ArchiveDownloadTask struct {
	task.TaskExtension
	model.ArchiveDecompressArgs

	SrcObjPath string
	DstDirPath string

	SrcStorageMp string
	DstStorageMp string
	Tool         tool.Tool
	// contains filtered or unexported fields
}

func (*ArchiveDownloadTask) GetName added in v3.42.0

func (t *ArchiveDownloadTask) GetName() string

func (*ArchiveDownloadTask) GetStatus added in v3.42.0

func (t *ArchiveDownloadTask) GetStatus() string

func (*ArchiveDownloadTask) Run added in v3.42.0

func (t *ArchiveDownloadTask) Run() error

func (*ArchiveDownloadTask) RunWithoutPushUploadTask added in v3.42.0

func (t *ArchiveDownloadTask) RunWithoutPushUploadTask() (*ArchiveContentUploadTask, error)

type CopyTask added in v3.29.0

type CopyTask struct {
	task.TaskExtension
	Status     string `json:"-"` //don't save status to save space
	SrcObjPath string `json:"src_path"`
	DstDirPath string `json:"dst_path"`

	SrcStorageMp string `json:"src_storage_mp"`
	DstStorageMp string `json:"dst_storage_mp"`
	// contains filtered or unexported fields
}

func (*CopyTask) GetName added in v3.29.0

func (t *CopyTask) GetName() string

func (*CopyTask) GetStatus added in v3.29.0

func (t *CopyTask) GetStatus() string

func (*CopyTask) Run added in v3.29.0

func (t *CopyTask) Run() error

type GetArgs added in v3.15.1

type GetArgs struct {
	NoLog bool
}

type GetStoragesArgs added in v3.15.1

type GetStoragesArgs struct {
}

type ListArgs added in v3.15.1

type ListArgs struct {
	Refresh bool
	NoLog   bool
}

type UploadTask added in v3.29.0

type UploadTask struct {
	task.TaskExtension
	// contains filtered or unexported fields
}

func (*UploadTask) GetName added in v3.29.0

func (t *UploadTask) GetName() string

func (*UploadTask) GetStatus added in v3.29.0

func (t *UploadTask) GetStatus() string

func (*UploadTask) Run added in v3.29.0

func (t *UploadTask) Run() error

Jump to

Keyboard shortcuts

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