https://github.com/kilianpaquier/filesystem
Easily work around files and directories in golang
https://github.com/kilianpaquier/filesystem
filesystem-library golang
Last synced: 11 months ago
JSON representation
Easily work around files and directories in golang
- Host: GitHub
- URL: https://github.com/kilianpaquier/filesystem
- Owner: kilianpaquier
- License: mit
- Created: 2024-02-24T09:20:08.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-16T19:25:08.000Z (about 2 years ago)
- Last Synced: 2024-06-21T14:29:47.950Z (about 2 years ago)
- Topics: filesystem-library, golang
- Language: Go
- Homepage: https://pkg.go.dev/github.com/kilianpaquier/filesystem/pkg
- Size: 50.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# filesystem
**Archive note**: Use [craft fs package](https://github.com/kilianpaquier/craft/tree/main/pkg/fs) which is cleaned up and better maintained.
---
- [How to use ?](#how-to-use-)
- [Features](#features)
## How to use ?
```sh
go get -u github.com/kilianpaquier/filesystem@latest
```
## Features
The filesystem package exposes some useful function around files, for instance a simple function as `func Exists(src) bool` to verify a file existence easily.
It also exposes `CopyFile(src, dst) error` and `CopyFileWithPerm(src, dst, perm) error` which copy a given src file to dst with either specific permissions or not.
It also exposes `CopyDir(srcdir, destdir)` to copy a full directory at another place. The destination directory will be created if it doesn't already.
The package also exposes some constants around permissions.