Esempio n. 1
0
func (d DirectoryMgr) Current(ft FileType) (path string) {
	path = d.current[d.objTypeIndex(ft)]
	if !tool.IsSubPath("/", path) {
		path = fmt.Sprintf("%s/%s", d.xmlRoot, path)
	}
	return
}
Esempio n. 2
0
func (d *DirectoryMgr) FilenameToShow(filepath string) (prefix, filename string) {
	// TODO: evaluate FREESP_SEARCH_PATH
	if tool.IsSubPath(d.xmlRoot, filepath) {
		filename = tool.RelPath(d.xmlRoot, filepath)
		prefix = d.xmlRoot
	} else {
		filename = filepath
	}
	return
}