ls

command
v0.0.0-...-24ca9bf Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: MIT, MIT Imports: 5 Imported by: 0

README

ls

ls (go version) – list directory contents

DESCRIPTION

For each operand that names a file of a type other than directory, ls writes the name of the file as well as any requested, associated information. For each operand that names a file of type directory, ls writes the names of files contained within that directory, as well as any requested, associated information.

If no operands are specified, the contents of the current directory are written. If more than one operand is specified, non-directory operands are written first; directory and non-directory operands are sorted separately according to the collating sequence in the current locale.


Based on the ls command from macOS 12.1, which is based on the original UNIX ls command. An ls command appeared in Version 1 AT&T UNIX. To maintain backward compatibility, the relationships between the many options are quite complex. IEEE Std 1003.2 (“POSIX.2”) mandates the original specification.


GitHub Workflow Status Codecov

Contributor Covenant

Twitter Follow GitHub followers


,

Getting Started

Prerequisites

Developed with Go v1.8. Go is extremely backwards compatible and semver stable. Nearly any v1.x should work fine.


Installation

To use this repo as a template for your own project:

gh repo create -y --public --template "https://github.com/skeptycal/ls"

Clone this repo to test and contribute:

# add repo to $GOPATH (xxxxxx is your computer login username)
go get github.com/xxxxxx/ls

cd ${GOPATH}/src/github.com/xxxxxx/ls

# test results and coverage info
./go.test.sh

# install as a utility package
go install

Use the Issues and PR templates on the GitHub repo page to contribute.


Basic Usage

This is a copy of the example script available in the cmd/example/ls folder:

package main

import "github.com/skeptycal/ls"

func main() {
    ls.Example()
}

To try it out:

# change to the sample folder
cd cmd/example/ls

# run the main.go program
go run ./main.go

# to compile as an executable
go build

Code of Conduct and Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us. Please read the Code of Conduct for details before submitting anything.


Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.


Contributors and Inspiration

  • Michael Treanor (GitHub / Twitter) - Initial work, updates, maintainer
  • Francesc Campoy - Inspiration and great YouTube videos!

See also the list of contributors who participated in this project.


License

Licensed under the MIT https://opensource.org/licenses/MIT - see the LICENSE file for details.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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