From 2814de7e527f73a4ceab6be2e3b24c5864c0eacb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=A8=E9=91=AB?= Date: Tue, 9 Sep 2025 20:26:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=86=97=E4=BD=99=E5=87=BD?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 周鑫 Change-Id: I4f059263e37067748125109cd199751fc475c63f --- interfaces/kits/js/src/mod_fs/fs_utils.cpp | 21 --------------------- interfaces/kits/js/src/mod_fs/fs_utils.h | 1 - 2 files changed, 22 deletions(-) diff --git a/interfaces/kits/js/src/mod_fs/fs_utils.cpp b/interfaces/kits/js/src/mod_fs/fs_utils.cpp index d8331b21b..8d150feb8 100644 --- a/interfaces/kits/js/src/mod_fs/fs_utils.cpp +++ b/interfaces/kits/js/src/mod_fs/fs_utils.cpp @@ -95,25 +95,4 @@ bool FsUtils::CheckPublicDirPath(const string &sandboxPath) return false; } -string FsUtils::Decode(const string &uri) -{ - ostringstream outPutStream; - const int32_t encodeLen = 2; - size_t index = 0; - while (index < uri.length()) { - if (uri[index] == '%') { - int hex = 0; - istringstream inputStream(uri.substr(index + 1, encodeLen)); - inputStream >> hex >> hex; - outPutStream << static_cast(hex); - index += encodeLen + 1; - } else { - outPutStream << uri[index]; - index++; - } - } - - return outPutStream.str(); -} - } // namespace OHOS::FileManagement::ModuleFileIO diff --git a/interfaces/kits/js/src/mod_fs/fs_utils.h b/interfaces/kits/js/src/mod_fs/fs_utils.h index f67e37428..5d6919b84 100644 --- a/interfaces/kits/js/src/mod_fs/fs_utils.h +++ b/interfaces/kits/js/src/mod_fs/fs_utils.h @@ -92,7 +92,6 @@ public: static void FsReqCleanup(uv_fs_t *req); static string GetModeFromFlags(const uint32_t &flags); static bool CheckPublicDirPath(const string &sandboxPath); - static string Decode(const string &uri); }; } // namespace OHOS::FileManagement::ModuleFileIO -- Gitee