mirror of
https://github.com/restic/restic.git
synced 2025-03-30 00:00:14 +01:00
20 lines
342 B
Go
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
|
|
}
|