mirror of
https://github.com/restic/restic.git
synced 2024-08-25 05:37:25 +02:00
14 lines
237 B
Go
14 lines
237 B
Go
package fs
|
|
|
|
import "os"
|
|
|
|
// 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
|
|
}
|