MCPcopy Create free account
hub / github.com/apache/mesos / validateLayout

Function validateLayout

src/appc/spec.cpp:117–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115
116
117Option<Error> validateLayout(const string& imagePath)
118{
119 if (!os::stat::isdir(getImageRootfsPath(imagePath))) {
120 return Error("No rootfs directory found in image layout");
121 }
122
123 if (!os::stat::isfile(getImageManifestPath(imagePath))) {
124 return Error("No manifest found in image layout");
125 }
126
127 return None();
128}
129
130
131Option<Error> validate(const string& imagePath)

Callers 2

validateFunction · 0.85
TEST_FFunction · 0.85

Calls 6

NoneClass · 0.85
getImageRootfsPathFunction · 0.70
getImageManifestPathFunction · 0.70
isdirFunction · 0.50
ErrorFunction · 0.50
isfileFunction · 0.50

Tested by

no test coverage detected