MCPcopy Create free account
hub / github.com/dropbox/dbxcli / parseRemoveOptions

Function parseRemoveOptions

cmd/rm.go:100–124  ·  view source on GitHub ↗
(cmd *cobra.Command)

Source from the content-addressed store, hash-verified

98}
99
100func parseRemoveOptions(cmd *cobra.Command) (removeOptions, error) {
101 force, err := cmd.Flags().GetBool("force")
102 if err != nil {
103 return removeOptions{}, err
104 }
105
106 recursive, err := cmd.Flags().GetBool("recursive")
107 if err != nil {
108 return removeOptions{}, err
109 }
110
111 permanent, err := cmd.Flags().GetBool("permanent")
112 if err != nil {
113 return removeOptions{}, err
114 }
115
116 verbose, _ := cmd.Flags().GetBool("verbose")
117
118 return removeOptions{
119 force: force,
120 recursive: recursive,
121 permanent: permanent,
122 verbose: verbose,
123 }, nil
124}
125
126func validateRemoveTargets(dbx filesClient, args []string, opts removeOptions) ([]removeTarget, error) {
127 var targets []removeTarget

Callers 1

rmFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected