| 261 | } |
| 262 | |
| 263 | bool |
| 264 | BundleResourceContainer::Matches(std::string const& name, std::string const& filePattern) const |
| 265 | { |
| 266 | // short-cut |
| 267 | if (filePattern == "*") |
| 268 | { |
| 269 | return true; |
| 270 | } |
| 271 | |
| 272 | std::stringstream ss(filePattern); |
| 273 | std::string tok; |
| 274 | std::size_t pos = 0; |
| 275 | while (std::getline(ss, tok, '*')) |
| 276 | { |
| 277 | std::size_t index = name.find(tok, pos); |
| 278 | if (index == std::string::npos) |
| 279 | { |
| 280 | return false; |
| 281 | } |
| 282 | pos = index + tok.size(); |
| 283 | } |
| 284 | return true; |
| 285 | } |
| 286 | |
| 287 | void |
| 288 | BundleResourceContainer::OpenAndInitializeContainer() const |