added file checker, completation/size/digest

This commit is contained in:
2026-03-30 13:20:13 +02:00
parent 8afe71d925
commit f5227bcac9
8 changed files with 291 additions and 43 deletions
+12
View File
@@ -21,6 +21,7 @@ type FileUtil struct {
exportFilesParams ExportFilesParams
deleteCollectionParams DeleteCollectionParams
listCollectionsParams ListCollectionsParams
checkFilesParams CheckFilesParams
commonFileParams CommonFileParams
}
@@ -125,6 +126,17 @@ func (util *FileUtil) MakeFileCmds() *cobra.Command {
exportFilesCmd.Flags().BoolVarP(&util.exportFilesParams.Regexp, "regex", "R", false, "Use path as collection path prefix")
subCmd.AddCommand(exportFilesCmd)
// CkeckFiles
var checkFilesCmd = &cobra.Command{
Use: "check [user:pass@]hostname[:port]/catalog",
Args: cobra.ExactArgs(1),
Short: "Ckeck files in storage",
Run: util.ListFiles,
}
checkFilesCmd.Flags().BoolVarP(&util.checkFilesParams.Detail, "detail", "D", false, "Show detail file information")
checkFilesCmd.Flags().BoolVarP(&util.checkFilesParams.Prefix, "prefix", "P", true, "Use path as collection path prefix")
checkFilesCmd.Flags().BoolVarP(&util.checkFilesParams.Regexp, "regex", "R", false, "Use path as collection path prefix")
subCmd.AddCommand(checkFilesCmd)
return subCmd
}