Skip to content

candango/fsok

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

go get github.com/candango/fsok

Then import in your code:

import "github.com/candango/fsok"

Usage

Check if a directory exists

import "github.com/candango/fsok/dir"

if dir.Exists("/tmp/mydir") {
    // Directory exists
}

Copy all contents of a directory

import "github.com/candango/fsok/dir"

err := dir.CopyAll("source", "destination")
if err != nil {
    log.Fatal(err)
}

Check if a file exists

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

About

Go library to help handle file and directory operations better.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages