mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 17:05:18 +00:00
14 lines
262 B
Go
14 lines
262 B
Go
package file
|
|
|
|
import "strings"
|
|
|
|
var InvalidMacOSChars = []rune{':', '\\', '*', '?', '"', '<', '>', '|', 0}
|
|
|
|
func IsValidMacOSName(fileName string) bool {
|
|
if fileName == "" {
|
|
return false
|
|
}
|
|
|
|
return !strings.ContainsAny(fileName, string(InvalidMacOSChars))
|
|
}
|