MCPcopy
hub / github.com/opencloud-eu/opencloud / consistencyCmd

Function consistencyCmd

opencloud/pkg/command/posixfs.go:142–154  ·  view source on GitHub ↗

consistencyCmd returns a command to check the consistency of the posixfs storage.

(cfg *config.Config)

Source from the content-addressed store, hash-verified

140
141// consistencyCmd returns a command to check the consistency of the posixfs storage.
142func consistencyCmd(cfg *config.Config) *cobra.Command {
143 consCmd := &cobra.Command{
144 Use: "consistency",
145 Short: "check the consistency of the posixfs storage",
146 RunE: func(cmd *cobra.Command, args []string) error {
147 return checkPosixfsConsistency(cmd, cfg)
148 },
149 }
150 consCmd.Flags().StringP("root", "r", "", "Path to the root directory of the posixfs storage")
151 _ = consCmd.MarkFlagRequired("root")
152
153 return consCmd
154}
155
156// checkPosixfsConsistency checks the consistency of the posixfs storage.
157func checkPosixfsConsistency(cmd *cobra.Command, cfg *config.Config) error {

Callers 1

PosixfsCommandFunction · 0.85

Calls 1

checkPosixfsConsistencyFunction · 0.85

Tested by

no test coverage detected