Documentation ¶
Index ¶
- Variables
- func Copy(ctx context.Context, srcObjPath, dstDirPath string, lazyCache ...bool) (task.TaskInfoWithCreator, error)
- func Get(ctx context.Context, path string, args *GetArgs) (model.Obj, error)
- 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(ctx context.Context, path string, args *ListArgs) ([]model.Obj, error)
- func MakeDir(ctx context.Context, path string, lazyCache ...bool) error
- func Move(ctx context.Context, srcPath, dstDirPath string, lazyCache ...bool) error
- func Other(ctx context.Context, args model.FsOtherArgs) (interface{}, error)
- func PutAsTask(ctx context.Context, dstDirPath string, file model.FileStreamer) (task.TaskInfoWithCreator, error)
- func PutDirectly(ctx context.Context, dstDirPath string, file model.FileStreamer, ...) error
- func Remove(ctx context.Context, path string) error
- func Rename(ctx context.Context, srcPath, dstName string, lazyCache ...bool) error
- func WalkFS(ctx context.Context, depth int, name string, info model.Obj, ...) error
- type CopyTask
- type GetArgs
- type GetStoragesArgs
- type ListArgs
- type UploadTask
Constants ¶
This section is empty.
Variables ¶
View Source
var CopyTaskManager *tache.Manager[*CopyTask]
View Source
var UploadTaskManager *tache.Manager[*UploadTask]
Functions ¶
func GetStorage ¶
func GetStorage(path string, args *GetStoragesArgs) (driver.Driver, error)
func PutAsTask ¶
func PutAsTask(ctx context.Context, dstDirPath string, file model.FileStreamer) (task.TaskInfoWithCreator, error)
func PutDirectly ¶
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 CopyTask ¶ added in v3.29.0
type CopyTask struct { task.TaskWithCreator 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 }
type GetStoragesArgs ¶ added in v3.15.1
type GetStoragesArgs struct { }
type UploadTask ¶ added in v3.29.0
type UploadTask struct { task.TaskWithCreator // 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
Click to show internal directories.
Click to hide internal directories.