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, l", Usage: "Long listing format"}, &cli.BoolFlag{Name: "all, 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 { listLong(file, all) } else { listShort(file, all) } } return nil }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.