// Copyright 2004-present Facebook. All Rights Reserved. #include "JSIndexedRAMBundleRegistry.h" #include #include #include "oss-compat-util.h" namespace facebook { namespace react { JSIndexedRAMBundleRegistry::JSIndexedRAMBundleRegistry(std::unique_ptr mainBundle, const std::string& baseDirectoryPath): RAMBundleRegistry(std::move(mainBundle)), m_baseDirectoryPath(baseDirectoryPath) {} std::unique_ptr JSIndexedRAMBundleRegistry::bundleById(uint32_t index) const { std::string bundlePathById = m_baseDirectoryPath + toString(index) + ".jsbundle"; return folly::make_unique(bundlePathById.c_str()); } } // namespace react } // namespace facebook