// SplitPath separates a file path into directory, filename (without extension)
// and file extension (with dot). If no directory could be derived "." is
// returned as a directory. If no file extension could be derived "" is returned
// as a file extension.
SplitPath separates a file path into directory, filename (without extension)
and file extension (with dot). If no directory could be derived "." is
returned as a directory. If no file extension could be derived "" is returned
as a file extension.
// SplitPath separates a file path into directory filename ( without extension ) // and file extension ( with dot ) . If no directory could be derived " . " is // returned as a directory . If no file extension could be derived " " is returned // as a file extension .
func SplitPath(filePath string) (dir string, base string, ext string) {
	dir = filepath.Dir(filePath)
	ext = filepath.Ext(filePath)
	base = filepath.Base(filePath)
	base = base[:len(base)-len(ext)]
	return dir, base, ext
}
func SplitPath ( filePath string ) ( dir string , base string , ext string ) { dir = filepath . Dir ( filePath ) ext = filepath . Ext ( filePath ) base = filepath . Base ( filePath ) base = base [ : len ( base ) - len ( ext ) ] return dir , base , ext }
SplitPath separates a file path into directory, filename (without extension)
and file extension (with dot).
SplitPath separates a file path into directory filename ( without extension ) and file extension ( with dot ) .