diff --git a/src/common/util/CMakeLists.txt b/src/common/util/CMakeLists.txt index c539913968f7ee..09fb2256644a5c 100644 --- a/src/common/util/CMakeLists.txt +++ b/src/common/util/CMakeLists.txt @@ -26,6 +26,7 @@ endif() set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/src/file_util.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/src/wstring_convert_util.cpp" PROPERTIES COMPILE_DEFINITIONS OpenVINO_VERSION="${OpenVINO_VERSION}") source_group("src" FILES ${LIBRARY_SRC}) diff --git a/src/common/util/include/openvino/util/file_path.hpp b/src/common/util/include/openvino/util/file_path.hpp index 34c326e67ec391..a0fc98fe86d9e8 100644 --- a/src/common/util/include/openvino/util/file_path.hpp +++ b/src/common/util/include/openvino/util/file_path.hpp @@ -7,10 +7,17 @@ #include #include "openvino/util/filesystem.hpp" +#include "openvino/util/wstring_convert_util.hpp" +//#include "openvino/util/util.hpp" + namespace ov { namespace util { #if defined(OPENVINO_HAS_FILESYSTEM) +// There are known issues with usage of std::filesystem::path unicode represenataion: +// * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95048 +// * https://stackoverflow.com/questions/58521857/cross-platform-way-to-handle-stdstring-stdwstring-with-stdfilesystempath +// Working compiler versions has been designated with godbolt. using Path = std::filesystem::path; #elif defined(OPENVINO_HAS_EXP_FILESYSTEM) // Known issues: @@ -30,5 +37,31 @@ using Path = std::filesystem::path; using Path = std::experimental::filesystem::path; #endif +#if !defined(__GNUC__) || (__GNUC__ > 12 || __GNUC__ == 12 && __GNUC_MINOR__ >= 3) +# define GCC_NOT_USED_OR_VER_AT_LEAST_12_3 +#endif + +#if !defined(__clang__) || defined(__clang__) && __clang_major__ >= 17 +# define CLANG_NOT_USED_OR_VER_AT_LEAST_17 +#endif + +#if defined(__GNUC__) && (__GNUC__ < 12 || __GNUC__ == 12 && __GNUC_MINOR__ < 3) +# define GCC_VER_LESS_THAN_12_3 +#endif + +#if defined(__clang__) && __clang_major__ < 17 +# define CLANG_VER_LESS_THAN_17 +#endif + +#if defined(GCC_VER_LESS_THAN_12_3) || defined(CLANG_VER_LESS_THAN_17) +inline ov::util::Path WPath(const std::wstring& wpath) { + return {ov::util::wstring_to_string(wpath)}; +} +#else +inline ov::util::Path WPath(const std::wstring& wpath) { + return {wpath}; +} +#endif + } // namespace util } // namespace ov diff --git a/src/common/util/include/openvino/util/file_util.hpp b/src/common/util/include/openvino/util/file_util.hpp index b4db4df774be9d..b8d51316640864 100644 --- a/src/common/util/include/openvino/util/file_util.hpp +++ b/src/common/util/include/openvino/util/file_util.hpp @@ -10,7 +10,9 @@ #include #include +#include "openvino/util/file_path.hpp" #include "openvino/util/util.hpp" +#include "openvino/util/wstring_convert_util.hpp" namespace ov { namespace util { @@ -89,19 +91,6 @@ const std::string& path_to_string(const Path& path) { } #ifdef OPENVINO_ENABLE_UNICODE_PATH_SUPPORT -/** - * @brief Conversion from wide character string to a single-byte chain. - * @param wstr A wide-char string - * @return A multi-byte string - */ -std::string wstring_to_string(const std::wstring& wstr); -/** - * @brief Conversion from single-byte chain to wide character string. - * @param str A null-terminated string - * @return A wide-char string - */ -std::wstring string_to_wstring(const std::string& str); - /** * @brief Convert path as wide character string to a single-byte chain. * @param path Path as wide-char string. @@ -172,12 +161,24 @@ bool directory_exists(const std::string& path); bool directory_exists(const std::wstring& path); #endif +inline ov::util::Path cut_android_path(const ov::util::Path& file_name) { + const auto& file_name_result = file_name.native(); + const auto pos = file_name_result.find('!'); + if (pos != std::decay_t::npos) { + return ov::util::Path(file_name_result.substr(0, pos)); + } + + return file_name; +} + /** * @brief Returns file size for file * @param[in] path The file name * @return file size */ -inline int64_t file_size(const char* path) { +[[deprecated("This function is deprecated use file_size(const ov::util::Path& path) instead. Will be removed in " + "2026.0")]] inline int64_t +file_size(const char* path) { #if defined(OPENVINO_ENABLE_UNICODE_PATH_SUPPORT) && defined(_WIN32) std::wstring widefilename = ov::util::string_to_wstring(path); const wchar_t* file_name = widefilename.c_str(); @@ -194,6 +195,17 @@ inline int64_t file_size(const char* path) { return in.tellg(); } +inline int64_t file_size(const ov::util::Path& path) { +#if defined(__ANDROID__) || defined(ANDROID) + const ov::util::Path& cut_path = cut_android_path(path); + std::ifstream in(cut_path, std::ios_base::binary | std::ios_base::ate); + return in.tellg(); +#else + std::ifstream in(path, std::ios_base::binary | std::ios_base::ate); + return in.tellg(); +#endif +} + /** * @brief Returns file size for file * @param[in] path The file name @@ -223,8 +235,11 @@ inline bool file_exists(const char* path) { * @param[in] path The file name * @return file size */ +inline int64_t file_size(const wchar_t* path) { + return file_size(wstring_to_string(path)); +} inline int64_t file_size(const std::wstring& path) { - return file_size(wstring_to_string(path).c_str()); + return file_size(wstring_to_string(path)); } /** @@ -237,15 +252,6 @@ inline bool file_exists(const std::wstring& path) { } #endif // OPENVINO_ENABLE_UNICODE_PATH_SUPPORT -/** - * @brief Returns file size for file - * @param[in] path The file name - * @return file size - */ -inline int64_t file_size(const std::string& path) { - return file_size(path.c_str()); -} - /** * @brief Returns true if file exists * @param[in] path The file name diff --git a/src/common/util/include/openvino/util/wstring_convert_util.hpp b/src/common/util/include/openvino/util/wstring_convert_util.hpp new file mode 100644 index 00000000000000..042e2a2528621e --- /dev/null +++ b/src/common/util/include/openvino/util/wstring_convert_util.hpp @@ -0,0 +1,31 @@ +// Copyright (C) 2018-2025 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include + +#include "openvino/util/util.hpp" + +namespace ov { +namespace util { + +#ifdef OPENVINO_ENABLE_UNICODE_PATH_SUPPORT +/** + * @brief Conversion from wide character string to a single-byte chain. + * @param wstr A wide-char string + * @return A multi-byte string + */ +std::string wstring_to_string(const std::wstring& wstr); +/** + * @brief Conversion from single-byte chain to wide character string. + * @param str A null-terminated string + * @return A wide-char string + */ +std::wstring string_to_wstring(const std::string& str); + +#endif + +} // namespace util +} // namespace ov diff --git a/src/common/util/src/file_util.cpp b/src/common/util/src/file_util.cpp index 9e1c0c41cea415..c454eacba7d680 100644 --- a/src/common/util/src/file_util.cpp +++ b/src/common/util/src/file_util.cpp @@ -338,46 +338,6 @@ void ov::util::convert_path_win_style(std::string& path) { std::replace(path.begin(), path.end(), '/', '\\'); } -#ifdef OPENVINO_ENABLE_UNICODE_PATH_SUPPORT - -# ifdef __clang__ -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wdeprecated-declarations" -# endif - -std::string ov::util::wstring_to_string(const std::wstring& wstr) { -# ifdef _WIN32 - int size_needed = WideCharToMultiByte(CP_UTF8, 0, &wstr[0], (int)wstr.size(), NULL, 0, NULL, NULL); - std::string strTo(size_needed, 0); - WideCharToMultiByte(CP_UTF8, 0, &wstr[0], (int)wstr.size(), &strTo[0], size_needed, NULL, NULL); - return strTo; -# else - std::wstring_convert> wstring_decoder; - return wstring_decoder.to_bytes(wstr); -# endif -} - -std::wstring ov::util::string_to_wstring(const std::string& string) { - const char* str = string.c_str(); -# ifdef _WIN32 - int strSize = static_cast(std::strlen(str)); - int size_needed = MultiByteToWideChar(CP_UTF8, 0, str, strSize, NULL, 0); - std::wstring wstrTo(size_needed, 0); - MultiByteToWideChar(CP_UTF8, 0, str, strSize, &wstrTo[0], size_needed); - return wstrTo; -# else - std::wstring_convert> wstring_encoder; - std::wstring result = wstring_encoder.from_bytes(str); - return result; -# endif -} - -# ifdef __clang__ -# pragma clang diagnostic pop -# endif - -#endif // OPENVINO_ENABLE_UNICODE_PATH_SUPPORT - std::string ov::util::get_absolute_file_path(const std::string& path) { std::string absolutePath; absolutePath.resize(MAX_ABS_PATH); diff --git a/src/common/util/src/wstring_convert_util.cpp b/src/common/util/src/wstring_convert_util.cpp new file mode 100644 index 00000000000000..de76e1134e150d --- /dev/null +++ b/src/common/util/src/wstring_convert_util.cpp @@ -0,0 +1,52 @@ +// Copyright (C) 2018-2025 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "openvino/util/wstring_convert_util.hpp" + +#ifdef OPENVINO_ENABLE_UNICODE_PATH_SUPPORT + +# include +# include + +# ifdef _WIN32 +# include +# endif + +# ifdef __clang__ +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wdeprecated-declarations" +# endif + +std::string ov::util::wstring_to_string(const std::wstring& wstr) { +# ifdef _WIN32 + int size_needed = WideCharToMultiByte(CP_UTF8, 0, &wstr[0], (int)wstr.size(), NULL, 0, NULL, NULL); + std::string strTo(size_needed, 0); + WideCharToMultiByte(CP_UTF8, 0, &wstr[0], (int)wstr.size(), &strTo[0], size_needed, NULL, NULL); + return strTo; +# else + std::wstring_convert> wstring_decoder; + return wstring_decoder.to_bytes(wstr); +# endif +} + +std::wstring ov::util::string_to_wstring(const std::string& string) { + const char* str = string.c_str(); +# ifdef _WIN32 + int strSize = static_cast(std::strlen(str)); + int size_needed = MultiByteToWideChar(CP_UTF8, 0, str, strSize, NULL, 0); + std::wstring wstrTo(size_needed, 0); + MultiByteToWideChar(CP_UTF8, 0, str, strSize, &wstrTo[0], size_needed); + return wstrTo; +# else + std::wstring_convert> wstring_encoder; + std::wstring result = wstring_encoder.from_bytes(str); + return result; +# endif +} + +# ifdef __clang__ +# pragma clang diagnostic pop +# endif + +#endif // OPENVINO_ENABLE_UNICODE_PATH_SUPPORT diff --git a/src/core/tests/file_util.cpp b/src/core/tests/file_util.cpp index 33d5d7f9db2896..d051939daf4438 100644 --- a/src/core/tests/file_util.cpp +++ b/src/core/tests/file_util.cpp @@ -262,18 +262,6 @@ TEST(file_util, path_cast) { EXPECT_TRUE(std::u16string(u"C:\\Users\\file.txt") == ov::util::Path(U"C:\\Users\\file.txt").u16string()); } -// There are known issues related with usage of std::filesystem::path unocode represenataion: -// https://jira.devtools.intel.com/browse/CVS-160477 -// * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95048 -// * https://stackoverflow.com/questions/58521857/cross-platform-way-to-handle-stdstring-stdwstring-with-stdfilesystempath -#if !defined(__GNUC__) || (__GNUC__ > 12 || __GNUC__ == 12 && __GNUC_MINOR__ >= 3) -# define GCC_NOT_USED_OR_VER_AT_LEAST_12_3 -#endif - -#if !defined(__clang__) || defined(__clang__) && __clang_major__ >= 17 -# define CLANG_NOT_USED_OR_VER_AT_LEAST_17 -#endif - TEST(file_util, path_cast_unicode) { EXPECT_EQ("~/狗/ǡ୫ԩϗ/にほ/ąę/ど/௸ඊƷ/狗1.txt", ov::util::Path("~/狗/ǡ୫ԩϗ/にほ/ąę/ど/௸ඊƷ/狗1.txt").generic_string()); EXPECT_TRUE(std::u16string(u"~/狗/ǡ୫ԩϗ/にほ/ąę/ど/௸ඊƷ/狗6.txt") == @@ -469,3 +457,192 @@ TEST(file_util, unicode_path_cast_from_wstring_to_char8_t) { ov::util::Path(L"~/狗/ǡ୫ԩϗ/にほ/ąę/ど/௸ඊƷ/狗33.txt").generic_u8string()); #endif } + +class CutAndroidPathTests : public ::testing::TestWithParam> {}; + +TEST_P(CutAndroidPathTests, HandlesStringPaths) { + const auto& [file_name, expected] = GetParam(); + ov::util::Path result = ov::util::cut_android_path(file_name); + EXPECT_EQ(result, expected); +} + +INSTANTIATE_TEST_SUITE_P( + WStringPathTests, + CutAndroidPathTests, + ::testing::Values( + std::make_tuple(ov::util::Path(L"path/to/file"), ov::util::Path(L"path/to/file")), + std::make_tuple(ov::util::Path(L"path/to/file!extra"), ov::util::Path(L"path/to/file")), + std::make_tuple(ov::util::Path(L""), ov::util::Path(L"")), + std::make_tuple(ov::util::Path(L"!"), ov::util::Path(L"")), + std::make_tuple(ov::util::Path(L"path/to/file!extra!more"), ov::util::Path(L"path/to/file")), + std::make_tuple(ov::util::WPath(L"狗"), ov::util::WPath(L"狗")), + std::make_tuple(ov::util::WPath(L"~/いろはにほへど/狗.txt"), ov::util::WPath(L"~/いろはにほへど/狗.txt")), + std::make_tuple(ov::util::WPath(L"~/いろはにほへど/狗.txt!"), ov::util::WPath(L"~/いろはにほへど/狗.txt")), + std::make_tuple(ov::util::WPath(L"!~/いろはにほへど/狗.txt"), ov::util::WPath(L"")), + std::make_tuple(ov::util::WPath(L"~/いろはにほへど/狗!.txt"), ov::util::WPath(L"~/いろはにほへど/狗")))); + +INSTANTIATE_TEST_SUITE_P( + StringPathTests, + CutAndroidPathTests, + ::testing::Values( + std::make_tuple(ov::util::Path(""), ov::util::Path("")), + std::make_tuple(ov::util::Path("!"), ov::util::Path("")), + std::make_tuple(ov::util::Path("My!/path/example.txt"), ov::util::Path("My")), + std::make_tuple(ov::util::Path("My/path!example.txt"), ov::util::Path("My/path")), + std::make_tuple(ov::util::Path("My/path/example.txt!"), ov::util::Path("My/path/example.txt")), + std::make_tuple(ov::util::Path("My/path/example.txt"), ov::util::Path("My/path/example.txt")), + std::make_tuple(ov::util::Path("!My/path/example.txt!"), ov::util::Path("")), + std::make_tuple(ov::util::Path(u8"~/いろはにほへど/狗.txt"), ov::util::Path(u8"~/いろはにほへど/狗.txt")), + std::make_tuple(ov::util::Path(u"~/いろはにほへど/狗.txt"), ov::util::Path(u"~/いろはにほへど/狗.txt")), + std::make_tuple(ov::util::Path(U"D:\\いろはにほへど\\猫.txt"), ov::util::Path(U"D:\\いろはにほへど\\猫.txt")), + std::make_tuple(ov::util::Path(u8"~/いろはにほへど/狗.txt!"), ov::util::Path(u8"~/いろはにほへど/狗.txt")), + std::make_tuple(ov::util::Path(u"~/いろはにほへど/狗.txt!"), ov::util::Path(u"~/いろはにほへど/狗.txt")), + std::make_tuple(ov::util::Path(U"D:\\いろはにほへど\\猫.txt!"), ov::util::Path(U"D:\\いろはにほへど\\猫.txt")), + std::make_tuple(ov::util::Path(u8"!~/いろはにほへど/狗.txt"), ov::util::Path(u8"")), + std::make_tuple(ov::util::Path(u"!~/いろはにほへど/狗.txt"), ov::util::Path(u"")), + std::make_tuple(ov::util::Path(U"!D:\\いろはにほへど\\猫.txt"), ov::util::Path(U"")), + std::make_tuple(ov::util::Path(u8"~/いろはにほへど/狗!.txt"), ov::util::Path(u8"~/いろはにほへど/狗")), + std::make_tuple(ov::util::Path(u"~/いろはにほへど/狗!.txt"), ov::util::Path(u"~/いろはにほへど/狗")), + std::make_tuple(ov::util::Path(U"D:\\いろはにほへど\\猫!.txt"), ov::util::Path(U"D:\\いろはにほへど\\猫")))); + +class FileUtilTest : public ::testing::Test { +protected: + void SetUp() override { + // Create a temporary files for testing + { std::ofstream outfile("test_file_0.txt"); } + { + std::ofstream outfile("test_file_21.txt"); + outfile << "This is a test file." << std::endl; + } + { + std::ofstream outfile("test_file_21x1000.txt"); + for (int i = 0; i < 1000; ++i) { + outfile << "This is a test file." << std::endl; + } + } + +#ifdef OPENVINO_ENABLE_UNICODE_PATH_SUPPORT + { + std::ofstream outfile(ov::util::Path(u8"这是_u8_.txt")); + outfile << "This is a test file." << std::endl; + } + { + std::ofstream outfile(ov::util::Path(U"这是_u16_.txt")); + outfile << "This is a test file." << std::endl; + } + { + std::ofstream outfile(ov::util::Path(U"这是_u32_.txt")); + outfile << "This is a test file." << std::endl; + } + { + std::ofstream outfile(ov::util::WPath(L"这是_wstring_.txt")); + outfile << "This is a test file." << std::endl; + } +#endif +#if defined(__ANDROID__) || defined(ANDROID) + { + std::ofstream outfile("android_test_file_21.txt"); + outfile << "This is a test file." << std::endl; + } +#endif + } + + void TearDown() override { + // Remove the temporary files after testing + std::filesystem::remove("test_file_0.txt"); + std::filesystem::remove("test_file_21.txt"); + std::filesystem::remove("test_file_21x1000.txt"); +#ifdef OPENVINO_ENABLE_UNICODE_PATH_SUPPORT + std::filesystem::remove(u8"这是_u8_.txt"); + std::filesystem::remove(u"这是_u16_.txt"); + std::filesystem::remove(U"这是_u32_.txt"); + std::filesystem::remove(ov::util::WPath(L"这是_wstring_.txt")); +#endif +#if defined(__ANDROID__) || defined(ANDROID) + std::filesystem::remove("android_test_file_21.txt"); +#endif + } +}; + +TEST_F(FileUtilTest, FileSizeNonExistentFileTest) { + EXPECT_EQ(ov::util::file_size("non_existent_file.txt"s), -1); + EXPECT_EQ(ov::util::file_size(L"non_existent_file.txt"), -1); + EXPECT_EQ(ov::util::file_size(ov::util::Path("non_existent_file.txt")), -1); +} + +TEST_F(FileUtilTest, EmptyFileSizeTest) { +#ifdef OPENVINO_CPP_VER_AT_LEAST_20 + EXPECT_EQ(ov::util::file_size(u8"test_file_0.txt"), 0); +#endif + EXPECT_EQ(ov::util::file_size("test_file_0.txt"s), 0); + EXPECT_EQ(ov::util::file_size(u"test_file_0.txt"), 0); + EXPECT_EQ(ov::util::file_size(U"test_file_0.txt"), 0); + EXPECT_EQ(ov::util::file_size(L"test_file_0.txt"), 0); + EXPECT_EQ(ov::util::file_size(std::wstring(L"test_file_0.txt")), 0); + EXPECT_EQ(ov::util::file_size(ov::util::Path("test_file_0.txt")), 0); + EXPECT_EQ(ov::util::file_size(ov::util::Path(u8"test_file_0.txt")), 0); + EXPECT_EQ(ov::util::file_size(ov::util::Path(u"test_file_0.txt")), 0); + EXPECT_EQ(ov::util::file_size(ov::util::Path(U"test_file_0.txt")), 0); + EXPECT_EQ(ov::util::file_size(ov::util::WPath(L"test_file_0.txt")), 0); +} + +TEST_F(FileUtilTest, FileSizeTest) { + EXPECT_EQ(ov::util::file_size("test_file_21.txt"s), 21); + EXPECT_EQ(ov::util::file_size(L"test_file_21.txt"), 21); + EXPECT_EQ(ov::util::file_size(ov::util::Path("test_file_21.txt")), 21); +} + +TEST_F(FileUtilTest, LargeFileSizeTest) { + EXPECT_EQ(ov::util::file_size("test_file_21x1000.txt"s), 21 * 1000); + EXPECT_EQ(ov::util::file_size(L"test_file_21x1000.txt"), 21 * 1000); + EXPECT_EQ(ov::util::file_size(ov::util::Path("test_file_21x1000.txt")), 21 * 1000); +} + +#ifdef OPENVINO_ENABLE_UNICODE_PATH_SUPPORT +TEST_F(FileUtilTest, u8FileSizeTest) { +# ifdef OPENVINO_CPP_VER_AT_LEAST_20 + EXPECT_EQ(ov::util::file_size(u8"这是_u8_.txt"), 21); +# endif + EXPECT_EQ(ov::util::file_size("这是_u8_.txt"s), 21); + EXPECT_EQ(ov::util::file_size(u"这是_u8_.txt"), 21); + EXPECT_EQ(ov::util::file_size(U"这是_u8_.txt"), 21); + EXPECT_EQ(ov::util::file_size(L"这是_u8_.txt"), 21); + EXPECT_EQ(ov::util::file_size(std::wstring(L"这是_u8_.txt")), 21); + EXPECT_EQ(ov::util::file_size(ov::util::Path("这是_u8_.txt")), 21); + EXPECT_EQ(ov::util::file_size(ov::util::Path(u8"这是_u8_.txt")), 21); + EXPECT_EQ(ov::util::file_size(ov::util::Path(u"这是_u8_.txt")), 21); + EXPECT_EQ(ov::util::file_size(ov::util::Path(U"这是_u8_.txt")), 21); + EXPECT_EQ(ov::util::file_size(ov::util::WPath(L"这是_u8_.txt")), 21); +} + +TEST_F(FileUtilTest, u16FileSizeTest) { + EXPECT_EQ(ov::util::file_size("这是_u16_.txt"s), 21); + EXPECT_EQ(ov::util::file_size(L"这是_u16_.txt"), 21); + EXPECT_EQ(ov::util::file_size(ov::util::Path("这是_u16_.txt")), 21); +} + +TEST_F(FileUtilTest, u32FileSizeTest) { + EXPECT_EQ(ov::util::file_size("这是_u32_.txt"s), 21); + EXPECT_EQ(ov::util::file_size(L"这是_u32_.txt"), 21); + EXPECT_EQ(ov::util::file_size(ov::util::Path("这是_u32_.txt")), 21); +} + +TEST_F(FileUtilTest, wstringFileSizeTest) { + EXPECT_EQ(ov::util::file_size("这是_wstring_.txt"s), 21); + EXPECT_EQ(ov::util::file_size(L"这是_wstring_.txt"), 21); + EXPECT_EQ(ov::util::file_size(ov::util::Path("这是_wstring_.txt")), 21); +} +#endif + +#if defined(__ANDROID__) || defined(ANDROID) +TEST_F(FileUtilTest, androidFileSizeTest) { + EXPECT_EQ(ov::util::file_size("android_test_file_21.txt"s), 21); + EXPECT_EQ(ov::util::file_size(L"android_test_file_21.txt"), 21); + EXPECT_EQ(ov::util::file_size(ov::util::Path("android_test_file_21.txt")), 21); +} +TEST_F(FileUtilTest, androidWithCutFileSizeTest) { + EXPECT_EQ(ov::util::file_size("android_test_file_21.txt!_to_cut.jar"s), 21); + EXPECT_EQ(ov::util::file_size(L"android_test_file_21.txt!_to_cut.jar"), 21); + EXPECT_EQ(ov::util::file_size(ov::util::Path("android_test_file_21.txt!_to_cut.jar")), 21); +} +#endif