1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-07-19 21:20:31 +08:00
Files
kubo/commands/files/is_hidden.go
gatesvp e55a130b49 Add hidden file support to add
License: MIT
Signed-off-by: Gaetan Voyer-Perrault <gatesvp@gmail.com>
2015-07-09 04:07:34 -07:00

20 lines
232 B
Go

// +build !windows
package files
import (
"path/filepath"
"strings"
)
func IsHidden(f File) bool {
fName := filepath.Base(f.FileName())
if strings.HasPrefix(fName, ".") && len(fName) > 1 {
return true
}
return false
}