/
githubmr
/
facebook-react-native
Обзор
Документация
Войти
/
githubmr
/
facebook-react-native
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
main
packages/react-native/ReactCxxPlatform/react/io/ResourceLoader.h
32 строки
985 B
Christoph Purrer
Add io target to ReactCxxPlatform (#51900)
10 июн 2025, 08:03
10 июн 2025, 08:03
56e5829
Код
Авторство
О чём код?
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <filesystem> #include <string> namespace facebook::react { class ResourceLoader { public: static bool isDirectory(const std::string& path); static bool isFile(const std::string& path); static bool isAbsolutePath(const std::string& path); static std::string getFileContents(const std::string& path); static std::filesystem::path getCacheDirectory( const std::string& path = std::string()); protected: static bool isResourceDirectory(const std::string& path); static bool isResourceFile(const std::string& path); static std::string getResourceFileContents(const std::string& path); private: static constexpr const auto CACHE_DIR = ".react-native-cxx-cache"; static std::filesystem::path getCacheRootPath(); }; } // namespace facebook::react