mirror of
https://github.com/IBM/fp-go.git
synced 2025-07-13 01:20:14 +02:00
fix: remove File.GetName and add Join for convenience
Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
This commit is contained in:
@ -15,9 +15,11 @@
|
||||
|
||||
package file
|
||||
|
||||
import "os"
|
||||
import "path/filepath"
|
||||
|
||||
// GetName is the getter for the `Name` property of [os.File]
|
||||
func GetName(f *os.File) string {
|
||||
return f.Name()
|
||||
// Join appends a filename to a root path
|
||||
func Join(name string) func(root string) string {
|
||||
return func(root string) string {
|
||||
return filepath.Join(root, name)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user