MCPcopy Index your code
hub / github.com/linuxkit/linuxkit / checkFile

Function checkFile

src/cmd/linuxkit/push_vcenter.go:78–88  ·  view source on GitHub ↗
(file string)

Source from the content-addressed store, hash-verified

76}
77
78func checkFile(file string) {
79 if _, err := os.Stat(file); err != nil {
80 if os.IsPermission(err) {
81 log.Fatalf("Unable to read file [%s], please check permissions", file)
82 } else if os.IsNotExist(err) {
83 log.Fatalf("File [%s], does not exist", file)
84 } else {
85 log.Fatalf("Unable to stat file [%s]: %v", file, err)
86 }
87 }
88}
89
90func uploadFile(c *govmomi.Client, newVM vmConfig, dss *object.Datastore) {
91 _, fileName := path.Split(*newVM.path)

Callers 2

pushOpenstackCmdFunction · 0.85
pushVCenterCmdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected