github.com/TrueBlocks/trueblocks-core/src/apps/chifra@v0.0.0-20241022031540-b362680128f7/pkg/file/pathparts.go (about)

     1  package file
     2  
     3  import (
     4  	"path/filepath"
     5  	"strings"
     6  )
     7  
     8  func GetPathParts(fullPath string) (folder string, filename string, ext string) {
     9  	folder = filepath.Dir(fullPath)
    10  	filename = filepath.Base(fullPath)
    11  	ext = filepath.Ext(fullPath)
    12  	filename = strings.ReplaceAll(filename, ext, "")
    13  	ext = strings.ReplaceAll(ext, ".", "")
    14  	return
    15  }