https://github.com/candango/fsok
Go library to help handle file and directory operations better.
https://github.com/candango/fsok
Last synced: 8 months ago
JSON representation
Go library to help handle file and directory operations better.
- Host: GitHub
- URL: https://github.com/candango/fsok
- Owner: candango
- License: mit
- Created: 2025-10-21T06:20:08.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2025-10-21T07:17:30.000Z (8 months ago)
- Last Synced: 2025-10-21T09:13:43.861Z (8 months ago)
- Language: Go
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Candango fsok
Candango **fsok** is a Go library designed to make file and directory
operations simple, reliable, and idiomatic. It provides helpers for common
tasks such as checking existence, copying directories, and working with files —
all with Go best practices in mind.
## Installation
Use `go get` to install:
```sh
go get github.com/candango/fsok
```
Then import in your code:
```go
import "github.com/candango/fsok"
```
## Usage
### Check if a directory exists
```go
import "github.com/candango/fsok/dir"
if dir.Exists("/tmp/mydir") {
// Directory exists
}
```
### Copy all contents of a directory
```go
import "github.com/candango/fsok/dir"
err := dir.CopyAll("source", "destination")
if err != nil {
log.Fatal(err)
}
```
### Check if a file exists
```go
import "github.com/candango/fsok/file"
if file.Exists("myfile.txt") {
// File exists
}
```
## Contributing
Contributions are welcome! Please open issues or pull requests on GitHub.
## License
[MIT](LICENSE)