command

package module
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: MIT Imports: 7 Imported by: 0

README

Documentation

Index

Constants

View Source
const (
	LsAll   lsAllFlag = true
	LsNoAll lsAllFlag = false
)
View Source
const (
	LsRecursive   lsRecursiveFlag = true
	LsNoRecursive lsRecursiveFlag = false
)
View Source
const (
	LsLongFormat   lsLongFormatFlag = true
	LsNoLongFormat lsLongFormatFlag = false
)

Variables

This section is empty.

Functions

func Ls

func Ls(path gloo.File, opts ...any) gloo.Source[[]byte]

Ls returns a Source that lists the entries of a directory, one name per item. Entries are emitted in the lexical order afero.ReadDir guarantees. By default, entries whose names start with "." are hidden.

Options:

  • LsAll (-a): also list entries whose names start with ".".
  • LsRecursive (-R): walk subdirectories, emitting paths relative to the root.
  • LsLongFormat (-l): emit "<perm> <size> <name>" per entry.
  • LsFs: read from a custom afero.Fs (defaults to the OS filesystem).

Types

type LsFs

type LsFs struct{ afero.Fs }

LsFs injects the filesystem Ls reads from. Tests pass an in-memory fs (afero.NewMemMapFs()); production callers omit it and get the OS filesystem.

Directories

Path Synopsis
Package alias provides unprefixed type aliases for ls command flags.
Package alias provides unprefixed type aliases for ls command flags.

Jump to

Keyboard shortcuts

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