Skip to content
/ fpath Public

Simple file path manipulation in go focusing on splits.

License

Notifications You must be signed in to change notification settings

j-schwar/fpath

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fpath

Simple file path manipulation focusing on splits and replacements.

Installation

$ go get -u github.com/j-schwar/fpath

Examples

File Extensions

Splitting a path on its extension:

file, ext := fpath.SplitExt("foo.go")
// file -> "foo"
// ext -> "go"

Replacing the extension of a file:

objFile := fpath.ReplaceExt("foo.cpp", "o")
// objFile -> "foo.o"

Removing a file extension:

file := fpath.RemoveExt("foo.go")
// file -> "foo"

About

Simple file path manipulation in go focusing on splits.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages