mirror of
https://github.com/rclone/rclone.git
synced 2025-12-11 22:14:05 +01:00
Added rclone archive command to create and read archive files
Some checks failed
build / windows (push) Has been cancelled
build / other_os (push) Has been cancelled
build / mac_amd64 (push) Has been cancelled
build / mac_arm64 (push) Has been cancelled
build / linux (push) Has been cancelled
build / go1.24 (push) Has been cancelled
build / linux_386 (push) Has been cancelled
build / lint (push) Has been cancelled
build / android-all (push) Has been cancelled
Build & Push Docker Images / Build Docker Image for linux/386 (push) Has been cancelled
Build & Push Docker Images / Build Docker Image for linux/amd64 (push) Has been cancelled
Build & Push Docker Images / Build Docker Image for linux/arm/v6 (push) Has been cancelled
Build & Push Docker Images / Build Docker Image for linux/arm/v7 (push) Has been cancelled
Build & Push Docker Images / Build Docker Image for linux/arm64 (push) Has been cancelled
Build & Push Docker Images / Merge & Push Final Docker Image (push) Has been cancelled
Some checks failed
build / windows (push) Has been cancelled
build / other_os (push) Has been cancelled
build / mac_amd64 (push) Has been cancelled
build / mac_arm64 (push) Has been cancelled
build / linux (push) Has been cancelled
build / go1.24 (push) Has been cancelled
build / linux_386 (push) Has been cancelled
build / lint (push) Has been cancelled
build / android-all (push) Has been cancelled
Build & Push Docker Images / Build Docker Image for linux/386 (push) Has been cancelled
Build & Push Docker Images / Build Docker Image for linux/amd64 (push) Has been cancelled
Build & Push Docker Images / Build Docker Image for linux/arm/v6 (push) Has been cancelled
Build & Push Docker Images / Build Docker Image for linux/arm/v7 (push) Has been cancelled
Build & Push Docker Images / Build Docker Image for linux/arm64 (push) Has been cancelled
Build & Push Docker Images / Merge & Push Final Docker Image (push) Has been cancelled
Co-Authored-By: Nick Craig-Wood <nick@craig-wood.com>
This commit is contained in:
committed by
Nick Craig-Wood
parent
409dc75328
commit
cc09978b79
40
cmd/archive/archive.go
Normal file
40
cmd/archive/archive.go
Normal file
@@ -0,0 +1,40 @@
|
||||
//go:build !plan9
|
||||
|
||||
// Package archive implements 'rclone archive'.
|
||||
package archive
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/rclone/rclone/cmd"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
func init() {
|
||||
cmd.Root.AddCommand(Command)
|
||||
}
|
||||
|
||||
// Command - archive command
|
||||
var Command = &cobra.Command{
|
||||
Use: "archive <action> [opts] <source> [<destination>]",
|
||||
Short: `Perform an action on an archive.`,
|
||||
Long: `Perform an action on an archive. Requires the use of a
|
||||
subcommand to specify the protocol, e.g.
|
||||
|
||||
rclone archive list remote:file.zip
|
||||
|
||||
Each subcommand has its own options which you can see in their help.
|
||||
|
||||
See [rclone archive create](/commands/rclone_archive_create/) for the
|
||||
archive formats supported.
|
||||
`,
|
||||
Annotations: map[string]string{
|
||||
"versionIntroduced": "v1.72",
|
||||
},
|
||||
RunE: func(command *cobra.Command, args []string) error {
|
||||
if len(args) == 0 {
|
||||
return errors.New("archive requires an action, e.g. 'rclone archive list remote:'")
|
||||
}
|
||||
return errors.New("unknown action")
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user