1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-26 09:47:49 +00:00
restic/internal/fs/helpers.go

14 lines
237 B
Go
Raw Normal View History

2017-12-23 11:12:36 +00:00
package fs
import "os"
2017-12-23 11:12:36 +00:00
// IsRegularFile returns true if fi belongs to a normal file. If fi is nil,
// false is returned.
func IsRegularFile(fi os.FileInfo) bool {
if fi == nil {
return false
}
return fi.Mode()&os.ModeType == 0
2017-12-23 11:12:36 +00:00
}