github.com/qjfoidnh/BaiduPCS-Go@v0.0.0-20231011165705-caa18a3765f3/internal/pcscommand/meta.go (about) 1 package pcscommand 2 3 import ( 4 "fmt" 5 ) 6 7 // RunGetMeta 执行 获取文件/目录的元信息 8 func RunGetMeta(targetPaths ...string) { 9 targetPaths, err := matchPathByShellPattern(targetPaths...) 10 if err != nil { 11 fmt.Println(err) 12 return 13 } 14 15 for k, targetPath := range targetPaths { 16 fmt.Printf("[%d] - [%s] --------------\n", k, targetPath) 17 data, err := GetBaiduPCS().FilesDirectoriesMeta(targetPath) 18 if err != nil { 19 fmt.Println(err) 20 return 21 } 22 fmt.Println() 23 fmt.Println(data) 24 } 25 }