https://github.com/maa3x/ppath
A robust and expressive suite of utilities for handling file system paths with ease
https://github.com/maa3x/ppath
filepath filesystem fs golang path
Last synced: 5 months ago
JSON representation
A robust and expressive suite of utilities for handling file system paths with ease
- Host: GitHub
- URL: https://github.com/maa3x/ppath
- Owner: maa3x
- License: mit
- Created: 2024-11-02T12:26:55.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-12-20T11:37:00.000Z (6 months ago)
- Last Synced: 2025-12-22T16:14:42.528Z (6 months ago)
- Topics: filepath, filesystem, fs, golang, path
- Language: Go
- Homepage:
- Size: 98.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Path Utility Library
This Go library provides a robust and expressive suite of utilities for handling file system paths with ease. Building on the standard path/filepath package, it introduces a set of intuitive, chainable methods that simplify file and directory operations such as path manipulation, pattern matching, directory traversal, and more. With this library, developers can effortlessly perform common file operations in a clean, readable style, making it ideal for projects that require efficient and flexible file system interactions.
## Installation
To install the library, use `go get`:
```sh
go get github.com/maa3x/ppath
```
## Usage
Here is a quick example of how to use the library:
```go
package main
import (
"fmt"
"log"
"github.com/maa3x/ppath"
)
func main() {
p := path.New("/Users/matrix/Code/go/projects")
p = p.Join("path", "README.md")
if !p.IsExist() {
log.Fatal("README.md not found!")
}
p2 := p.NthParent(2).Join("clone")
if err := p.Dir().Copy(p2); err != nil {
log.Fatal(err)
}
}
```