An open API service indexing awesome lists of open source software.

https://github.com/xyproto/workingdir

:rowboat: Package for running quick commands and simple interaction with directories
https://github.com/xyproto/workingdir

commands execute shell

Last synced: 3 months ago
JSON representation

:rowboat: Package for running quick commands and simple interaction with directories

Awesome Lists containing this project

README

          

# workingdir

Package for running quick commands and simple interaction with directories.

### Quick example

```go
package main

import (
wd "github.com/xyproto/workingdir"
)

func main() {
print(wd.Run("echo hello"))
}
```

### Another example

```go
package main

import (
"fmt"
wd "github.com/xyproto/workingdir"
)

func main() {
dir, err := wd.New("/tmp")
if err != nil {
panic(err)
}
fmt.Printf("There are %d entries in %s\n", len(dir.List()), dir.Path())
fmt.Printf("Current date: %s\n", dir.TrimRun("date --iso-8601"))
}
```

### General info

* License: MIT
* Author: Alexander F. Rødseth <xyproto@archlinux.org>
* Version: 0.1