diff --git a/interfaces/kits/js/src/mod_fs/common_func.cpp b/interfaces/kits/js/src/mod_fs/common_func.cpp index 3b10d60e20a1d97af077f4ae7744e41e7b7fc0ed..c1d41a3c2bcfb50bb4655e20344318dd59b1e0b9 100644 --- a/interfaces/kits/js/src/mod_fs/common_func.cpp +++ b/interfaces/kits/js/src/mod_fs/common_func.cpp @@ -368,27 +368,6 @@ string CommonFunc::GetModeFromFlags(unsigned int flags) return mode; } -string CommonFunc::Decode(const std::string &uri) -{ - std::ostringstream outPutStream; - const int32_t encodeLen = 2; - size_t index = 0; - while (index < uri.length()) { - if (uri[index] == '%') { - int hex = 0; - std::istringstream inputStream(uri.substr(index + 1, encodeLen)); - inputStream >> std::hex >> hex; - outPutStream << static_cast(hex); - index += encodeLen + 1; - } else { - outPutStream << uri[index]; - index++; - } - } - - return outPutStream.str(); -} - #if !defined(WIN_PLATFORM) && !defined(IOS_PLATFORM) && !defined(CROSS_PLATFORM) bool IsNumeric(const string &str) { diff --git a/interfaces/kits/js/src/mod_fs/common_func.h b/interfaces/kits/js/src/mod_fs/common_func.h index d536abaaeff4aa38562fd4e293c7e29c7026a0a0..2f01f57628580a68d3877d2407e31bae19ae1fe7 100644 --- a/interfaces/kits/js/src/mod_fs/common_func.h +++ b/interfaces/kits/js/src/mod_fs/common_func.h @@ -106,7 +106,6 @@ struct CommonFunc { napi_value dstPath); static void fs_req_cleanup(uv_fs_t* req); static std::string GetModeFromFlags(unsigned int flags); - static std::string Decode(const std::string &uri); #if !defined(WIN_PLATFORM) && !defined(IOS_PLATFORM) && !defined(CROSS_PLATFORM) static bool GetAndCheckUserId(Uri* uri, std::string &userId); static bool IsSystemApp();