// NameFromPath will extract the name of an object. This is basically just a
// file or directory name.
NameFromPath will extract the name of an object. This is basically just a
file or directory name.
// NameFromPath will extract the name of an object . This is basically just a // file or directory name .
func NameFromPath(path string) (name string) {
	_, fname := filepath.Split(path)
	dir := filepath.Dir(path)
	if fname == "" && dir != "" {
		_, fname = filepath.Split(dir)
	}
	flen := len(fname) - len(filepath.Ext(fname))
	name = fname[0:flen]
	if config.Debug {
		log.Printf("NameFromPath(%s) returns %s", path, name)
	}
	return name
}
func NameFromPath ( path string ) ( name string ) { _ , fname := filepath . Split ( path ) dir := filepath . Dir ( path ) if fname == " " && dir != " " { _ , fname = filepath . Split ( dir ) } flen := len ( fname ) - len ( filepath . Ext ( fname ) ) name = fname [ 0 : flen ] if config . Debug { log . Printf ( " " , path , name ) } return name }
NameFromPath will extract the name of an object.
NameFromPath will extract the name of an object .