mirror of
https://github.com/filebrowser/filebrowser.git
synced 2026-07-18 00:45:47 +00:00
12 lines
246 B
Go
12 lines
246 B
Go
package files
|
|
|
|
func isBinary(content string) bool {
|
|
for _, b := range content {
|
|
// 65533 is the unknown char
|
|
// 8 and below are control chars (e.g. backspace, null, eof, etc)
|
|
if b <= 8 || b == 65533 {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|