Skip to content
small-tkPublic

About

A golang path library. Salute to python pathlib.

Resources

Stars

8 stars

Watchers

0 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Report Card license

pathlib

A golang path library, it is easy to use. Similar to Python patblib.

该项目目前处于积极发展期😀,欢迎 issues

Installation

go get -u github.com/small-tk/pathlib

Enjoy

package main

import "github.com/small-tk/pathlib"

func main (){
	p := New("test.txt")

	fmt.Println(p.Absolute())
	fmt.Println(p.Cwd())
	fmt.Println(p.Parent())
	fmt.Println(p.Touch())

	fmt.Println(p.Unlink())
	fmt.Println(p.MkDir(os.ModePerm, true))
	fmt.Println(p.RmDir())
	fmt.Println(p.Open())
	fmt.Println(p.Chmod(os.ModePerm))
	fmt.Println(p.Chmod(os.ModePerm))

	fmt.Println(p.Exists())
	fmt.Println(p.IsDir())
	fmt.Println(p.IsFile())
	fmt.Println(p.IsAbs())
}

About

A golang path library. Salute to python pathlib.

Resources

Stars

8 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages