1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2025-03-30 00:00:14 +01:00
restic/src/restic/fs/file_all.go
2016-03-28 15:26:46 +02:00

20 lines
342 B
Go

// +build !linux
package fs
import "os"
// Open opens a file for reading.
func Open(name string) (File, error) {
f, err := os.OpenFile(name, os.O_RDONLY, 0)
return osFile{File: f}, err
}
// osFile wraps an *os.File and adds a no-op ClearCache() method.
type osFile struct {
*os.File
}
func (osFile) ClearCache() error {
return nil
}