feat: support browse files on web (#283)

This commit is contained in:
Levi authored and GitHub committed 2023-11-29 18:24:01 +08:00
1 parent ee7da179c1
commit db15650664
14 files changed
+145 -71

No files matched your search

+9
View File
@@ -57,6 +57,15 @@ func (m *FetcherMeta) SingleFilepath() string {
return path.Join(m.Opts.Path, file.Path, fileName)
}
// RootDirPath return the root dir path of the task file.
func (m *FetcherMeta) RootDirPath() string {
if m.Res.Name != "" {
return m.FolderPath()
} else {
return m.Opts.Path
}
}
// FetcherBuilder defines the interface for a fetcher builder.
type FetcherBuilder interface {
// Schemes returns the schemes supported by the fetcher.