mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
libpod removal from main (phase 2)
this is phase 2 for the removal of libpod from main. Signed-off-by: baude <bbaude@redhat.com>
This commit is contained in:
@ -24,17 +24,6 @@ const (
|
||||
DefaultTransport = "docker://"
|
||||
)
|
||||
|
||||
// OpenExclusiveFile opens a file for writing and ensure it doesn't already exist
|
||||
func OpenExclusiveFile(path string) (*os.File, error) {
|
||||
baseDir := filepath.Dir(path)
|
||||
if baseDir != "" {
|
||||
if _, err := os.Stat(baseDir); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
return os.OpenFile(path, os.O_RDWR|os.O_CREATE|os.O_EXCL, 0666)
|
||||
}
|
||||
|
||||
// FuncTimer helps measure the execution time of a function
|
||||
// For debug purposes, do not leave in code
|
||||
// used like defer FuncTimer("foo")
|
||||
|
Reference in New Issue
Block a user