command

package module
v0.1.22 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2026 License: MIT Imports: 7 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.

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
⌂ 换网址