Beispiel #1
0
func (i *pathIO) assertFileIsNotHidden(p gopath.GoPath) {
	if i.hasErr() {
		return
	}
	if p.HasErr() {
		i.syncedErrs(p)
		return
	}

	if strings.HasPrefix(p.Base(), ".") {
		i.setErr(store.NewPathNotFoundError(fmt.Sprintf("%s is a hidden file and may not be displayed", p)))
	}

	// HINT: recursive call, ending at content root
	if i.isPathInsideContentRoot(p) {
		i.assertFileIsNotHidden(p.ToSlash().Dir())
	}
}