diff --git a/interfaces/kits/js/src/mod_fs/fs_utils.cpp b/interfaces/kits/js/src/mod_fs/fs_utils.cpp index fdd6ca4e42d2b60e1dae9235506be61f8ec98d5d..6ce1f5693c60e6f0522147c5c3584f0506b2a034 100644 --- a/interfaces/kits/js/src/mod_fs/fs_utils.cpp +++ b/interfaces/kits/js/src/mod_fs/fs_utils.cpp @@ -85,25 +85,4 @@ string FsUtils::GetModeFromFlags(const uint32_t &flags) return mode; } -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 1cddb0660355d67c3d83bd52464a066047ed3e47..7ce915ebfdc60df81e578329b547ef03d78d9275 100644 --- a/interfaces/kits/js/src/mod_fs/fs_utils.h +++ b/interfaces/kits/js/src/mod_fs/fs_utils.h @@ -91,7 +91,6 @@ public: static uint32_t ConvertFlags(const uint32_t &flags); static void FsReqCleanup(uv_fs_t *req); static string GetModeFromFlags(const uint32_t &flags); - static string Decode(const string &uri); }; } // namespace OHOS::FileManagement::ModuleFileIO