tool

package
v0.5.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2023 License: Apache-2.0, MIT Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ExtractCarCmd = &cli.Command{
	Name:     "extract-car",
	Category: "Utility",
	Usage:    "Extract folders or files from a folder of CAR files to a local directory",
	Flags: []cli.Flag{
		&cli.StringFlag{
			Name:     "input-dir",
			Usage:    "Input directory containing CAR files. This directory will be scanned recursively",
			Required: true,
			Aliases:  []string{"i"},
		},
		&cli.StringFlag{
			Name:    "output",
			Usage:   "Output directory or file to extract to. It will be created if it does not exist",
			Aliases: []string{"o"},
			Value:   ".",
		},
		&cli.StringFlag{
			Name:     "cid",
			Usage:    "CID of the folder or file to extract",
			Required: true,
			Aliases:  []string{"c"},
		},
	},
	Action: func(c *cli.Context) error {
		inputDir := c.String("input-dir")
		output := c.String("output")
		id := c.String("cid")
		cidValue, err := cid.Decode(id)
		if err != nil {
			return errors.Wrap(err, "failed to decode CID")
		}

		return tool.ExtractCarHandler(c, inputDir, output, cidValue)
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL