list

package
v1.74.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: MIT Imports: 13 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

Overview

Package list implements 'rclone archive list'

Index

Constants

This section is empty.

Variables

View Source
var Command = &cobra.Command{
	Use:   "list [flags] <source>",
	Short: `List archive contents from source.`,
	Long: strings.ReplaceAll(`
List the contents of an archive to the console, auto detecting the
format. See [rclone archive create](/commands/rclone_archive_create/)
for the archive formats supported.

For example:

|||
$ rclone archive list remote:archive.zip
        6 file.txt
        0 dir/
        4 dir/bye.txt
|||

Or with |--long| flag for more info:

|||
$ rclone archive list --long remote:archive.zip
        6 2025-10-30 09:46:23.000000000 file.txt
        0 2025-10-30 09:46:57.000000000 dir/
        4 2025-10-30 09:46:57.000000000 dir/bye.txt
|||

Or with |--plain| flag which is useful for scripting:

|||
$ rclone archive list --plain /path/to/archive.zip
file.txt
dir/
dir/bye.txt
|||

Or with |--dirs-only|:

|||
$ rclone archive list --plain --dirs-only /path/to/archive.zip
dir/
|||

Or with |--files-only|:

|||
$ rclone archive list --plain --files-only /path/to/archive.zip
file.txt
dir/bye.txt
|||

Filters may also be used:

|||
$ rclone archive list --long archive.zip --include "bye.*"
        4 2025-10-30 09:46:57.000000000 dir/bye.txt
|||

The [archive backend](/archive/) can also be used to list files. It
can be used to read only mount archives also but it supports a
different set of archive formats to the archive commands.
`, "|", "`"),
	Annotations: map[string]string{
		"versionIntroduced": "v1.72",
	},
	RunE: func(command *cobra.Command, args []string) error {
		cmd.CheckArgs(1, 1, command, args)
		src, srcFile := cmd.NewFsFile(args[0])
		cmd.Run(false, false, command, func() error {
			return ArchiveList(context.Background(), src, srcFile, listFile)
		})
		return nil
	},
}

Command - list

Functions

func ArchiveList

func ArchiveList(ctx context.Context, src fs.Fs, srcFile string, listFn archives.FileHandler) error

ArchiveList -- print a list of the files in the archive

Types

This section is empty.

Jump to

Keyboard shortcuts

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