Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = &cli.Command{ Name: "ls", Usage: "List directory contents", Flags: []cli.Flag{ &cli.BoolFlag{Name: "long", Aliases: []string{"l"}, Usage: "Long listing format"}, &cli.BoolFlag{Name: "all", Aliases: []string{"a"}, Usage: "Include hidden files"}, }, Action: func(ctx context.Context, cmd *cli.Command) error { long := cmd.Bool("long") all := cmd.Bool("all") files := cmd.Args().Slice() if len(files) == 0 { files = []string{"."} } for _, file := range files { if long { if err := listLong(file, all); err != nil { fmt.Fprintln(os.Stderr, err) } } else { if err := listShort(file, all); err != nil { fmt.Fprintln(os.Stderr, err) } } } return nil }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.