github.com/keltia/go-ipfs@v0.3.8-0.20150909044612-210793031c63/commands/files/is_hidden.go (about)

     1  // +build !windows
     2  
     3  package files
     4  
     5  import (
     6  	"path/filepath"
     7  	"strings"
     8  )
     9  
    10  func IsHidden(f File) bool {
    11  
    12  	fName := filepath.Base(f.FileName())
    13  
    14  	if strings.HasPrefix(fName, ".") && len(fName) > 1 {
    15  		return true
    16  	}
    17  
    18  	return false
    19  }