mirror of
https://github.com/containers/podman.git
synced 2025-12-02 11:08:36 +08:00
Update containers/storage
New pinned commit is 477e551dd493e5c80999d3690d3a201fd26ba2f1 Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #425 Approved by: rhatdan
This commit is contained in:
40
vendor/github.com/containers/storage/lockfile_windows.go
generated
vendored
Normal file
40
vendor/github.com/containers/storage/lockfile_windows.go
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
// +build windows
|
||||
|
||||
package storage
|
||||
|
||||
import (
|
||||
"os"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
func getLockFile(path string, ro bool) (Locker, error) {
|
||||
return &lockfile{}, nil
|
||||
}
|
||||
|
||||
type lockfile struct {
|
||||
mu sync.Mutex
|
||||
file string
|
||||
}
|
||||
|
||||
func (l *lockfile) Lock() {
|
||||
}
|
||||
func (l *lockfile) Unlock() {
|
||||
}
|
||||
func (l *lockfile) Modified() (bool, error) {
|
||||
return false, nil
|
||||
}
|
||||
func (l *lockfile) Touch() error {
|
||||
return nil
|
||||
}
|
||||
func (l *lockfile) IsReadWrite() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (l *lockfile) TouchedSince(when time.Time) bool {
|
||||
stat, err := os.Stat(l.file)
|
||||
if err != nil {
|
||||
return true
|
||||
}
|
||||
return when.Before(stat.ModTime())
|
||||
}
|
||||
Reference in New Issue
Block a user