From c560309e263a82eded7b4bb50ae6f3e1e8f84171 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=9F=83=E5=8D=9A=E6=8B=89=E9=85=B1?= Date: Wed, 31 Aug 2022 09:27:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=8C=85=EF=BC=9AMATLAB.IO=EF=BC=8C?= =?UTF-8?q?=E6=8F=90=E4=BE=9BZipReader=EF=BC=8CZIP=E6=A1=A3=E6=A1=88?= =?UTF-8?q?=E8=AF=BB=E5=85=A5=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- +MATLAB/+IO/LibzipException.m | 37 ++ +MATLAB/+IO/ZipFileReader.m | 42 ++ +MATLAB/+IO/ZipReader.m | 123 ++++++ +MATLAB/+internal/InnerException.m | 7 + +MATLAB/+internal/WindowsAPI.m | 28 +- +MATLAB/MatlabException.m | 22 +- +MATLAB/Version.m | 2 +- README.md | 41 +- "Windows\345\271\263\345\217\260/LipZip.cpp" | 75 +++- .../MATLAB\345\274\202\345\270\270.cpp" | 2 +- .../MATLAB\345\274\202\345\270\270.h" | 4 +- "Windows\345\271\263\345\217\260/MexAPI.h" | 1 + .../MexFunction.cpp" | 9 + .../Windows\345\271\263\345\217\260.vcxproj" | 404 +++++++++--------- ...s\345\271\263\345\217\260.vcxproj.filters" | 106 ++--- .../packages.config" | 8 +- resources/functionSignatures.json | 106 +++++ .../1rRuAs0JLa7h-gfukn8CiuQ-EAId.xml | 2 + .../1rRuAs0JLa7h-gfukn8CiuQ-EAIp.xml | 2 + .../ae9UQQy0iEnx0Gv4KxappinoZ5sd.xml | 6 + .../ae9UQQy0iEnx0Gv4KxappinoZ5sp.xml | 2 + .../oPDBF2CTM9tmCIy2CwYPvObXlwEd.xml | 6 + .../oPDBF2CTM9tmCIy2CwYPvObXlwEp.xml | 2 + .../wy6EtxqLvfkGb7dnIwyIS1GE0ZId.xml | 6 + .../wy6EtxqLvfkGb7dnIwyIS1GE0ZIp.xml | 2 + .../2ec6_pLkoJRjy3S3VqKrXJnF-God.xml | 2 + .../2ec6_pLkoJRjy3S3VqKrXJnF-Gop.xml | 2 + .../bQTKZhymdBfDcJkF7U0Phq5B0Zwd.xml | 6 + .../bQTKZhymdBfDcJkF7U0Phq5B0Zwp.xml | 2 + ...AB \346\211\251\345\261\225 Extension.prj" | 310 +++++++------- 30 files changed, 933 insertions(+), 434 deletions(-) create mode 100644 +MATLAB/+IO/LibzipException.m create mode 100644 +MATLAB/+IO/ZipFileReader.m create mode 100644 +MATLAB/+IO/ZipReader.m create mode 100644 +MATLAB/+internal/InnerException.m create mode 100644 resources/project/2ec6_pLkoJRjy3S3VqKrXJnF-Go/1rRuAs0JLa7h-gfukn8CiuQ-EAId.xml create mode 100644 resources/project/2ec6_pLkoJRjy3S3VqKrXJnF-Go/1rRuAs0JLa7h-gfukn8CiuQ-EAIp.xml create mode 100644 resources/project/2ec6_pLkoJRjy3S3VqKrXJnF-Go/ae9UQQy0iEnx0Gv4KxappinoZ5sd.xml create mode 100644 resources/project/2ec6_pLkoJRjy3S3VqKrXJnF-Go/ae9UQQy0iEnx0Gv4KxappinoZ5sp.xml create mode 100644 resources/project/2ec6_pLkoJRjy3S3VqKrXJnF-Go/oPDBF2CTM9tmCIy2CwYPvObXlwEd.xml create mode 100644 resources/project/2ec6_pLkoJRjy3S3VqKrXJnF-Go/oPDBF2CTM9tmCIy2CwYPvObXlwEp.xml create mode 100644 resources/project/2ec6_pLkoJRjy3S3VqKrXJnF-Go/wy6EtxqLvfkGb7dnIwyIS1GE0ZId.xml create mode 100644 resources/project/2ec6_pLkoJRjy3S3VqKrXJnF-Go/wy6EtxqLvfkGb7dnIwyIS1GE0ZIp.xml create mode 100644 resources/project/7ijvf-bEwYkM1TgRc0LIKlxzjYA/2ec6_pLkoJRjy3S3VqKrXJnF-God.xml create mode 100644 resources/project/7ijvf-bEwYkM1TgRc0LIKlxzjYA/2ec6_pLkoJRjy3S3VqKrXJnF-Gop.xml create mode 100644 resources/project/mnD5nDe0hRvwL_kM8v7LavHwsgo/bQTKZhymdBfDcJkF7U0Phq5B0Zwd.xml create mode 100644 resources/project/mnD5nDe0hRvwL_kM8v7LavHwsgo/bQTKZhymdBfDcJkF7U0Phq5B0Zwp.xml diff --git a/+MATLAB/+IO/LibzipException.m b/+MATLAB/+IO/LibzipException.m new file mode 100644 index 0000000..0eb2754 --- /dev/null +++ b/+MATLAB/+IO/LibzipException.m @@ -0,0 +1,37 @@ +classdef LibzipException1 + if isreal(NameOrIndex) + NameOrIndex=uint64(NameOrIndex); + end + FileReader=MATLAB.internal.WindowsAPI.ZipFopen.Call(obj.Pointer,NameOrIndex); + else + FileReader=MATLAB.internal.WindowsAPI.ZipFopen.Call(obj.Pointer); + end + FileReader=arrayfun(@(Pointer)MATLAB.IO.ZipFileReader(Pointer,obj),FileReader); + end + function Sizes=GetSize(obj,NameOrIndex) + %获取档案中指定文件的压缩前大小 + %# 语法 + % ``` + % Sizes=obj.GetSize + % %获取档案中所有文件的大小 + % + % Sizes=obj.GetSize(Names); + % %获取档案中具有指定文件名的文件大小 + % + % Sizes=obj.GetSize(Indices); + % %获取档案中指定索引处的文件大小 + % ``` + %# 输入参数 + % Names(:,1)string,要查询大小的文件名,可以一次查询多个文件 + % Indices(:,1)uint64,要查询大小的文件索引,从0开始,可以一次查询多个文件 + %# 返回值 + % Sizes(:,1)uint64,对应ZIP内指定顺序的每个文件返回其压缩前大小 + if nargin>1 + if isreal(NameOrIndex) + NameOrIndex=uint64(NameOrIndex); + end + Sizes=MATLAB.internal.WindowsAPI.ZipGetSize.Call(obj.Pointer,NameOrIndex); + else + Sizes=MATLAB.internal.WindowsAPI.ZipGetSize.Call(obj.Pointer); + end + end + function Names=GetName(obj,Indices) + %根据索引取得文件名 + %# 语法 + % ``` + % Names=obj.GetName; + % %取得档案中所有文件名 + % + % Names=obj.GetName(Indices); + % %取得档案中指定索引的文件名 + % ``` + %# 输入参数 + % Indices(:,1)uint64,要查找的文件索引,从0开始,可以一次查找多个文件 + %# 返回值 + % Names(:,1)string,对应指定索引取得的文件名 + %See also MATLAB.IO.ZipReader.NameLocate MATLAB.IO.ZipReader.GetNumEntries + if nargin>1 + Names=MATLAB.internal.WindowsAPI.ZipGetName.Call(obj.Pointer,uint64(Indices)); + else + Names=MATLAB.internal.WindowsAPI.ZipGetName.Call(obj.Pointer); + end + end + function NumEntries=GetNumEntries(obj) + %获取档案中的文件数目 + %# 语法 + % ``` + % NumEntries=obj.GetNumEntries; + % ``` + %# 返回值 + % NumEntries(1,1)int64,档案中的文件数目 + %See also MATLAB.IO.ZipReader.GetName + NumEntries=MATLAB.internal.WindowsAPI.ZipGetNumEntries.Call(obj.Pointer); + end + function delete(obj) + MATLAB.internal.WindowsAPI.ZipDiscard.Call(obj.Pointer); + end + end +end \ No newline at end of file diff --git a/+MATLAB/+internal/InnerException.m b/+MATLAB/+internal/InnerException.m new file mode 100644 index 0000000..1a624e1 --- /dev/null +++ b/+MATLAB/+internal/InnerException.m @@ -0,0 +1,7 @@ +classdef InnerException(std::move(inputs[2])); const size_t 文件数目 = 文件列表.getNumberOfElements(); buffer_ptr_t读入字节 = 数组工厂.createBuffer(文件数目 * nbytes); - TypedArray实际读数 = 数组工厂.createArray({ 文件数目 }); + TypedArray实际读数 = 数组工厂.createArray({ 1,文件数目 }); uint8_t* 写出头 = 读入字节.get(); for (size_t a = 0; a < 文件数目; ++a) { zip_file_t* const 文件 = (zip_file_t*)(uint64_t)文件列表[a]; if ((实际读数[a] = zip_fread(文件, 写出头, nbytes)) == -1) [[unlikely]] - throw MATLAB异常(Zip文件读入失败, LibZip异常, zip_file_get_error(文件)->zip_err, a); + throw MATLAB异常(Zip文件读入失败, LibZip异常, zip_file_get_error(文件)->zip_err, a); 写出头 += nbytes; } outputs[1] = 数组工厂.createArrayFromBuffer({ nbytes,文件数目 }, std::move(读入字节)); @@ -111,6 +112,75 @@ API声明(ZipDiscard) { zip_discard(万能转码(std::move(inputs[1]))); } +API声明(ZipGetSize) +{ + zip_t* const Zip = 万能转码(std::move(inputs[1])); + zip_stat_t Stat; + switch (inputs.size()) + { + case 2: + { + const zip_int64_t 文件数目 = 取文件数目(Zip); + TypedArray返回列表 = 数组工厂.createArray({ (size_t)文件数目 }); + for (zip_int64_t a = 0; a < 文件数目; ++a) + { + if (zip_stat_index(Zip, a, 0, &Stat) == -1) [[unlikely]] + throw MATLAB异常(Zip文件明细获取失败, LibZip异常, zip_get_error(Zip)->zip_err, a); + if (Stat.valid & ZIP_STAT_SIZE) + 返回列表[a] = Stat.size; + else[[unlikely]] + throw MATLAB异常(Zip未记录文件大小, a); + } + outputs[1] = std::move(返回列表); + } + break; + case 3: + { + Array& 文件参数 = inputs[2]; + const size_t 文件数目 = 文件参数.getNumberOfElements(); + TypedArray返回列表 = 数组工厂.createArray({ 文件数目 }); + switch (文件参数.getType()) + { + case ArrayType::CELL: + case ArrayType::CHAR: + case ArrayType::MATLAB_STRING: + { + std::unique_ptr文件名 = 万能转码>(std::move(文件参数)); + for (size_t a = 0; a < 文件数目; ++a) + { + if (zip_stat(Zip, 文件名[a].c_str(), 0, &Stat) == -1) [[unlikely]] + throw MATLAB异常(Zip文件明细获取失败, LibZip异常, zip_get_error(Zip)->zip_err, a); + if (Stat.valid & ZIP_STAT_SIZE) + 返回列表[a] = Stat.size; + else [[unlikely]] + throw MATLAB异常(Zip未记录文件大小, a); + } + } + break; + case ArrayType::UINT64: + { + TypedArray文件索引(std::move(文件参数)); + for (size_t a = 0; a < 文件数目; ++a) + { + if (zip_stat_index(Zip, 文件索引[a], 0, &Stat) == -1) [[unlikely]] + throw MATLAB异常(Zip文件明细获取失败, LibZip异常, zip_get_error(Zip)->zip_err, a); + if (Stat.valid & ZIP_STAT_SIZE) + 返回列表[a] = Stat.size; + else [[unlikely]] + throw MATLAB异常(Zip未记录文件大小, a); + } + } + break; + [[unlikely]] default: + throw MATLAB异常(输入参数类型错误, 2); + } + outputs[1] = std::move(返回列表); + } + break; + [[unlikely]] default: + throw MATLAB异常(输入参数数目错误); + } +} API声明(ZipGetName) { zip_t* const Zip = 万能转码(std::move(inputs[1])); @@ -125,6 +195,7 @@ API声明(ZipGetName) throw MATLAB异常(Zip文件名获取失败, LibZip异常, zip_get_error(Zip)->zip_err, a); outputs[1] = 万能转码(文件名列表.get(), 文件数目); } + break; case 3: { TypedArray 文件索引(std::move(inputs[2])); diff --git "a/Windows\345\271\263\345\217\260/MATLAB\345\274\202\345\270\270.cpp" "b/Windows\345\271\263\345\217\260/MATLAB\345\274\202\345\270\270.cpp" index a4c9b23..730026f 100644 --- "a/Windows\345\271\263\345\217\260/MATLAB\345\274\202\345\270\270.cpp" +++ "b/Windows\345\271\263\345\217\260/MATLAB\345\274\202\345\270\270.cpp" @@ -7,6 +7,6 @@ MATLAB异常::operator StructArray()const noexcept 返回[0]["ExceptionType"] = 数组工厂.createScalar(异常类型); 返回[0]["InnerException"] = 数组工厂.createScalar(内部异常); 返回[0]["ErrorCode"] = 数组工厂.createScalar(错误代码); - 返回[0]["Index"] = 数组工厂.createScalar(第几个); + 返回[0]["Index"] = 数组工厂.createScalar(第几个 + 1); return 返回; } \ No newline at end of file diff --git "a/Windows\345\271\263\345\217\260/MATLAB\345\274\202\345\270\270.h" "b/Windows\345\271\263\345\217\260/MATLAB\345\274\202\345\270\270.h" index 11a4786..5ffabbe 100644 --- "a/Windows\345\271\263\345\217\260/MATLAB\345\274\202\345\270\270.h" +++ "b/Windows\345\271\263\345\217\260/MATLAB\345\274\202\345\270\270.h" @@ -14,6 +14,8 @@ enum MATLAB异常类型 :uint8_t 输入参数数目错误, Zip档案无效, Zip文件名获取失败, + Zip文件明细获取失败, + Zip未记录文件大小, }; enum 内部异常类型 :uint8_t { @@ -26,7 +28,7 @@ struct MATLAB异常 MATLAB异常类型 异常类型 = 成功; 内部异常类型 内部异常 = 无; int 错误代码 = 0; - size_t 第几个 = 0; + size_t 第几个 = -1; constexpr MATLAB异常() {} constexpr MATLAB异常(MATLAB异常类型 异常类型) :异常类型(异常类型) {} constexpr MATLAB异常(MATLAB异常类型 异常类型, size_t 第几个) : 异常类型(异常类型), 第几个(第几个) {} diff --git "a/Windows\345\271\263\345\217\260/MexAPI.h" "b/Windows\345\271\263\345\217\260/MexAPI.h" index 4a0131c..3673985 100644 --- "a/Windows\345\271\263\345\217\260/MexAPI.h" +++ "b/Windows\345\271\263\345\217\260/MexAPI.h" @@ -21,5 +21,6 @@ API声明(ZipFopen); API声明(ZipFread); API声明(ZipFclose); API声明(ZipDiscard); +API声明(ZipGetSize); API声明(ZipGetName); API声明(ZipGetNumEntries); \ No newline at end of file diff --git "a/Windows\345\271\263\345\217\260/MexFunction.cpp" "b/Windows\345\271\263\345\217\260/MexFunction.cpp" index d9a092d..7da3652 100644 --- "a/Windows\345\271\263\345\217\260/MexFunction.cpp" +++ "b/Windows\345\271\263\345\217\260/MexFunction.cpp" @@ -10,6 +10,15 @@ void MexFunction::operator()(ArgumentList& outputs, ArgumentList& inputs) CopyFile, Delete, MoveFile, + ZipOpen, + ZipNameLocate, + ZipFopen, + ZipFread, + ZipFclose, + ZipDiscard, + ZipGetSize, + ZipGetName, + ZipGetNumEntries, }; try { diff --git "a/Windows\345\271\263\345\217\260/Windows\345\271\263\345\217\260.vcxproj" "b/Windows\345\271\263\345\217\260/Windows\345\271\263\345\217\260.vcxproj" index 9ca6563..676d352 100644 --- "a/Windows\345\271\263\345\217\260/Windows\345\271\263\345\217\260.vcxproj" +++ "b/Windows\345\271\263\345\217\260/Windows\345\271\263\345\217\260.vcxproj" @@ -1,203 +1,203 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - 16.0 - Win32Proj - {8fe29544-0044-4726-960e-b0f07194a747} - Windows平台 - 10.0 - - - - DynamicLibrary - true - v143 - Unicode - - - DynamicLibrary - false - v143 - true - Unicode - - - DynamicLibrary - true - v143 - Unicode - - - DynamicLibrary - false - v143 - true - Unicode - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)+MATLAB\+internal\private\ - .mexw64 - WindowsCall - C:\Users\vhtmf\source\repos\Mex工具\nuget\build\native\include;$(VC_IncludePath);$(WindowsSDK_IncludePath); - C:\Users\vhtmf\source\repos\Mex工具\nuget\build\native\lib;$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64) - MultiThreadedDebug - - - $(SolutionDir)+MATLAB\+internal\private\ - .mexw64 - WindowsCall - C:\Users\vhtmf\source\repos\Mex工具\nuget\build\native\include;$(VC_IncludePath);$(WindowsSDK_IncludePath); - C:\Users\vhtmf\source\repos\Mex工具\nuget\build\native\lib;$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64) - MultiThreaded - - - - Level3 - true - WIN32;_DEBUG;WINDOWS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - Use - pch.h - - - Windows - true - false - - - - - Level3 - true - true - true - WIN32;NDEBUG;WINDOWS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - Use - pch.h - - - Windows - true - true - true - false - - - - - Level3 - true - _DEBUG;WINDOWS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - Use - pch.h - stdcpplatest - stdc17 - true - AdvancedVectorExtensions2 - true - - - Windows - true - false - Mex工具.v143.x64.$(Configuration).lib;$(CoreLibraryDependencies);%(AdditionalDependencies) - - - - - Level3 - true - true - true - NDEBUG;WINDOWS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - Use - pch.h - stdcpplatest - stdc17 - true - AdvancedVectorExtensions2 - true - - - Windows - true - true - true - false - Mex工具.v143.x64.$(Configuration).lib;$(CoreLibraryDependencies);%(AdditionalDependencies) - - - - - - - - - - - - - - - Create - Create - Create - Create - - - - - - - - - - - - - - 这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。 - - - - + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {8fe29544-0044-4726-960e-b0f07194a747} + Windows平台 + 10.0 + + + + DynamicLibrary + true + v143 + Unicode + + + DynamicLibrary + false + v143 + true + Unicode + + + DynamicLibrary + true + v143 + Unicode + + + DynamicLibrary + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)+MATLAB\+internal\private\ + .mexw64 + WindowsCall + $(VC_IncludePath);$(WindowsSDK_IncludePath) + $(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64) + MultiThreadedDebug + + + $(SolutionDir)+MATLAB\+internal\private\ + .mexw64 + WindowsCall + $(VC_IncludePath);$(WindowsSDK_IncludePath) + $(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64) + MultiThreaded + + + + Level3 + true + WIN32;_DEBUG;WINDOWS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + + + Windows + true + false + + + + + Level3 + true + true + true + WIN32;NDEBUG;WINDOWS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + + + Windows + true + true + true + false + + + + + Level3 + true + _DEBUG;WINDOWS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + stdcpplatest + stdc17 + true + AdvancedVectorExtensions2 + true + + + Windows + true + false + $(CoreLibraryDependencies);%(AdditionalDependencies) + + + + + Level3 + true + true + true + NDEBUG;WINDOWS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + stdcpplatest + stdc17 + true + AdvancedVectorExtensions2 + true + + + Windows + true + true + true + false + $(CoreLibraryDependencies);%(AdditionalDependencies) + + + + + + + + + + + + + + + Create + Create + Create + Create + + + + + + + + + + + + + + 这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。 + + + + \ No newline at end of file diff --git "a/Windows\345\271\263\345\217\260/Windows\345\271\263\345\217\260.vcxproj.filters" "b/Windows\345\271\263\345\217\260/Windows\345\271\263\345\217\260.vcxproj.filters" index a8ceb20..b0932e1 100644 --- "a/Windows\345\271\263\345\217\260/Windows\345\271\263\345\217\260.vcxproj.filters" +++ "b/Windows\345\271\263\345\217\260/Windows\345\271\263\345\217\260.vcxproj.filters" @@ -1,54 +1,54 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - 头文件 - - - 头文件 - - - 头文件 - - - 头文件 - - - - - 源文件 - - - 源文件 - - - 源文件 - - - 源文件 - - - 源文件 - - - 源文件 - - - - - + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + 头文件 + + + 头文件 + + + 头文件 + + + 头文件 + + + + + 源文件 + + + 源文件 + + + 源文件 + + + 源文件 + + + 源文件 + + + 源文件 + + + + + \ No newline at end of file diff --git "a/Windows\345\271\263\345\217\260/packages.config" "b/Windows\345\271\263\345\217\260/packages.config" index 8eb1877..088c263 100644 --- "a/Windows\345\271\263\345\217\260/packages.config" +++ "b/Windows\345\271\263\345\217\260/packages.config" @@ -1,5 +1,5 @@ - - - - + + + + \ No newline at end of file diff --git a/resources/functionSignatures.json b/resources/functionSignatures.json index f0e28a4..36b8dab 100644 --- a/resources/functionSignatures.json +++ b/resources/functionSignatures.json @@ -993,6 +993,112 @@ } ] }, + "MATLAB.IO.ZipFileReader.Read":{ + "inputs":[ + { + "name":"objs", + "kind":"required", + "type":"MATLAB.IO.ZipFileReader", + "purpose":"要读入的文件" + }, + { + "name":"NumBytes", + "kind":"required", + "type":"positive", + "purpose":"要读入的字节数上限" + } + ] + }, + "MATLAB.IO.ZipReader":{ + "inputs":[ + { + "name":"ZipPath", + "kind":"required", + "type":[["file=*.zip"],["string","scalar"],["char","row"]], + "purpose":"ZIP档案路径" + } + ] + }, + "MATLAB.IO.ZipReader.NameLocate":{ + "inputs":[ + { + "name":"obj" + }, + { + "name":"Names", + "kind":"required", + "type":[["string"],["char","row"],["cell"]], + "purpose":"要查找的文件名" + } + ] + }, + "MATLAB.IO.ZipReader.FOpen":{ + "inputs":[ + { + "name":"obj" + }, + { + "mutuallyExclusiveGroup":[ + [ + { + "name":"Names", + "kind":"ordered", + "type":[["string"],["char","row"],["cell"]], + "purpose":"要打开的文件名" + } + ], + [ + { + "name":"Indices", + "kind":"ordered", + "type":"real", + "purpose":"要打开的文件索引,从0开始" + } + ] + ] + } + ] + }, + "MATLAB.IO.ZipReader.GetSize":{ + "inputs":[ + { + "name":"obj" + }, + { + "mutuallyExclusiveGroup":[ + [ + { + "name":"Names", + "kind":"ordered", + "type":[["string"],["char","row"],["cell"]], + "purpose":"要查询的文件名" + } + ], + [ + { + "name":"Indices", + "kind":"ordered", + "type":"real", + "purpose":"要查询的文件索引,从0开始" + } + ] + ] + } + ] + }, + "MATLAB.IO.ZipReader.GetName":{ + "inputs":[ + { + "name":"obj" + }, + { + "name":"Indices", + "kind":"ordered", + "type":"real", + "purpose":"要查找的文件索引,从0开始" + } + ] + }, "MATLAB.IOFun.DelimitedStrings2Table": { "inputs": [ { diff --git a/resources/project/2ec6_pLkoJRjy3S3VqKrXJnF-Go/1rRuAs0JLa7h-gfukn8CiuQ-EAId.xml b/resources/project/2ec6_pLkoJRjy3S3VqKrXJnF-Go/1rRuAs0JLa7h-gfukn8CiuQ-EAId.xml new file mode 100644 index 0000000..a75f7a8 --- /dev/null +++ b/resources/project/2ec6_pLkoJRjy3S3VqKrXJnF-Go/1rRuAs0JLa7h-gfukn8CiuQ-EAId.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/resources/project/2ec6_pLkoJRjy3S3VqKrXJnF-Go/1rRuAs0JLa7h-gfukn8CiuQ-EAIp.xml b/resources/project/2ec6_pLkoJRjy3S3VqKrXJnF-Go/1rRuAs0JLa7h-gfukn8CiuQ-EAIp.xml new file mode 100644 index 0000000..842de6a --- /dev/null +++ b/resources/project/2ec6_pLkoJRjy3S3VqKrXJnF-Go/1rRuAs0JLa7h-gfukn8CiuQ-EAIp.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/resources/project/2ec6_pLkoJRjy3S3VqKrXJnF-Go/ae9UQQy0iEnx0Gv4KxappinoZ5sd.xml b/resources/project/2ec6_pLkoJRjy3S3VqKrXJnF-Go/ae9UQQy0iEnx0Gv4KxappinoZ5sd.xml new file mode 100644 index 0000000..7a6326b --- /dev/null +++ b/resources/project/2ec6_pLkoJRjy3S3VqKrXJnF-Go/ae9UQQy0iEnx0Gv4KxappinoZ5sd.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/resources/project/2ec6_pLkoJRjy3S3VqKrXJnF-Go/ae9UQQy0iEnx0Gv4KxappinoZ5sp.xml b/resources/project/2ec6_pLkoJRjy3S3VqKrXJnF-Go/ae9UQQy0iEnx0Gv4KxappinoZ5sp.xml new file mode 100644 index 0000000..0fe2e15 --- /dev/null +++ b/resources/project/2ec6_pLkoJRjy3S3VqKrXJnF-Go/ae9UQQy0iEnx0Gv4KxappinoZ5sp.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/resources/project/2ec6_pLkoJRjy3S3VqKrXJnF-Go/oPDBF2CTM9tmCIy2CwYPvObXlwEd.xml b/resources/project/2ec6_pLkoJRjy3S3VqKrXJnF-Go/oPDBF2CTM9tmCIy2CwYPvObXlwEd.xml new file mode 100644 index 0000000..7a6326b --- /dev/null +++ b/resources/project/2ec6_pLkoJRjy3S3VqKrXJnF-Go/oPDBF2CTM9tmCIy2CwYPvObXlwEd.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/resources/project/2ec6_pLkoJRjy3S3VqKrXJnF-Go/oPDBF2CTM9tmCIy2CwYPvObXlwEp.xml b/resources/project/2ec6_pLkoJRjy3S3VqKrXJnF-Go/oPDBF2CTM9tmCIy2CwYPvObXlwEp.xml new file mode 100644 index 0000000..b2cb95e --- /dev/null +++ b/resources/project/2ec6_pLkoJRjy3S3VqKrXJnF-Go/oPDBF2CTM9tmCIy2CwYPvObXlwEp.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/resources/project/2ec6_pLkoJRjy3S3VqKrXJnF-Go/wy6EtxqLvfkGb7dnIwyIS1GE0ZId.xml b/resources/project/2ec6_pLkoJRjy3S3VqKrXJnF-Go/wy6EtxqLvfkGb7dnIwyIS1GE0ZId.xml new file mode 100644 index 0000000..7a6326b --- /dev/null +++ b/resources/project/2ec6_pLkoJRjy3S3VqKrXJnF-Go/wy6EtxqLvfkGb7dnIwyIS1GE0ZId.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/resources/project/2ec6_pLkoJRjy3S3VqKrXJnF-Go/wy6EtxqLvfkGb7dnIwyIS1GE0ZIp.xml b/resources/project/2ec6_pLkoJRjy3S3VqKrXJnF-Go/wy6EtxqLvfkGb7dnIwyIS1GE0ZIp.xml new file mode 100644 index 0000000..053cc2b --- /dev/null +++ b/resources/project/2ec6_pLkoJRjy3S3VqKrXJnF-Go/wy6EtxqLvfkGb7dnIwyIS1GE0ZIp.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/resources/project/7ijvf-bEwYkM1TgRc0LIKlxzjYA/2ec6_pLkoJRjy3S3VqKrXJnF-God.xml b/resources/project/7ijvf-bEwYkM1TgRc0LIKlxzjYA/2ec6_pLkoJRjy3S3VqKrXJnF-God.xml new file mode 100644 index 0000000..a75f7a8 --- /dev/null +++ b/resources/project/7ijvf-bEwYkM1TgRc0LIKlxzjYA/2ec6_pLkoJRjy3S3VqKrXJnF-God.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/resources/project/7ijvf-bEwYkM1TgRc0LIKlxzjYA/2ec6_pLkoJRjy3S3VqKrXJnF-Gop.xml b/resources/project/7ijvf-bEwYkM1TgRc0LIKlxzjYA/2ec6_pLkoJRjy3S3VqKrXJnF-Gop.xml new file mode 100644 index 0000000..1f110f3 --- /dev/null +++ b/resources/project/7ijvf-bEwYkM1TgRc0LIKlxzjYA/2ec6_pLkoJRjy3S3VqKrXJnF-Gop.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/resources/project/mnD5nDe0hRvwL_kM8v7LavHwsgo/bQTKZhymdBfDcJkF7U0Phq5B0Zwd.xml b/resources/project/mnD5nDe0hRvwL_kM8v7LavHwsgo/bQTKZhymdBfDcJkF7U0Phq5B0Zwd.xml new file mode 100644 index 0000000..7a6326b --- /dev/null +++ b/resources/project/mnD5nDe0hRvwL_kM8v7LavHwsgo/bQTKZhymdBfDcJkF7U0Phq5B0Zwd.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/resources/project/mnD5nDe0hRvwL_kM8v7LavHwsgo/bQTKZhymdBfDcJkF7U0Phq5B0Zwp.xml b/resources/project/mnD5nDe0hRvwL_kM8v7LavHwsgo/bQTKZhymdBfDcJkF7U0Phq5B0Zwp.xml new file mode 100644 index 0000000..2aef976 --- /dev/null +++ b/resources/project/mnD5nDe0hRvwL_kM8v7LavHwsgo/bQTKZhymdBfDcJkF7U0Phq5B0Zwp.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git "a/\345\237\203\345\215\232\346\213\211\351\205\261 \347\232\204 MATLAB \346\211\251\345\261\225 Extension.prj" "b/\345\237\203\345\215\232\346\213\211\351\205\261 \347\232\204 MATLAB \346\211\251\345\261\225 Extension.prj" index 30b3334..a8c315c 100644 --- "a/\345\237\203\345\215\232\346\213\211\351\205\261 \347\232\204 MATLAB \346\211\251\345\261\225 Extension.prj" +++ "b/\345\237\203\345\215\232\346\213\211\351\205\261 \347\232\204 MATLAB \346\211\251\345\261\225 Extension.prj" @@ -1,158 +1,154 @@ - - - 埃博拉酱 的 MATLAB 扩展 Extension - 埃博拉酱 - vhtmfu@outlook.com - 一致行动党 - 埃博拉酱的MATLAB扩展工具包,提供一系列MATLAB内置函数所欠缺,但却常用的增强功能(部分功能仅支持Windows系统)。例如,可枚举异常基类,各种容器类,类 SQL SELECT 多表查询,返回数组最大值的坐标,带误差阴影的多线图,许多内置函数的功能强化升级版…… - 埃博拉酱的MATLAB扩展工具包,提供一系列MATLAB内置函数所欠缺,但却常用的增强功能。 - -本项目的发布版本号遵循语义化版本规范。开发者认为这是一个优秀的规范,并向每一位开发者推荐遵守此规范。 - -目录 -本包中所有函数均在MATLAB命名空间下,使用前需import。使用命名空间是一个好习惯,可以有效防止命名冲突,避免编码时不必要的代码提示干扰。 - -+MATLAB -+Containers -+DataFun -+DataTypes -+ElMat -+General -+IOFun -+Lang -+Ops -+SpecFun -+SupportPkg 一键获取MATLAB硬件支持包 -+UITools -每个代码文件内部都有详细文档,可以用doc命令查看 - ${PROJECT_ROOT}\图标.png - 9.0.2 - ${PROJECT_ROOT}\埃博拉酱 的 MATLAB 扩展 Extension.mltbx - - - - - b344599a-983e-4a6c-bd99-ed3a1bdd9626 - % List files contained in your toolbox folder that you would like to exclude -% from packaging. Excludes should be listed relative to the toolbox folder. -% Some examples of how to specify excludes are provided below: -% -% A single file in the toolbox folder: -% .svn -% -% A single file in a subfolder of the toolbox folder: -% example/.svn -% -% All files in a subfolder of the toolbox folder: -% example/* -% -% All files of a certain name in all subfolders of the toolbox folder: -% **/.svn -% -% All files matching a pattern in all subfolders of the toolbox folder: -% **/*.bak -% -.git* -.resources/project -**/*.asv -.vs -packages -**/*.mltbx -**/*.exp -**/*.lib -**/*.pdb -Windows平台 -**/*.sln - true - - - - - - - - - false - - - - - - R2021a - latest - false - true - false - false - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${PROJECT_ROOT} - - - ${PROJECT_ROOT}\+MATLAB - ${PROJECT_ROOT}\README.md - ${PROJECT_ROOT}\resources - ${PROJECT_ROOT}\图标.png - ${PROJECT_ROOT}\示例数据 - - - - - - C:\Users\vhtmf\Documents\MATLAB\MATLAB扩展\埃博拉酱 的 MATLAB 扩展 Extension.mltbx - - - - C:\Program Files\MATLAB\R2022b - - - - false - false - true - false - false - false - false - false - 10.0 - false - true - win64 - true - - + + + 埃博拉酱 的 MATLAB 扩展 Extension + 埃博拉酱 + vhtmfu@outlook.com + 一致行动党 + 埃博拉酱的MATLAB扩展工具包,提供一系列MATLAB内置函数所欠缺,但却常用的增强功能(部分功能仅支持Windows系统)。例如,ZIP档案读入器,可枚举异常基类,各种容器类,类 SQL SELECT 多表查询,返回数组最大值的坐标,许多内置函数的功能强化升级版…… + 本包中所有函数均在MATLAB命名空间下,使用前需import。使用命名空间是一个好习惯,可以有效防止命名冲突,避免编码时不必要的代码提示干扰。 + ++MATLAB ++Containers ++DataFun ++DataTypes ++ElMat ++General ++IO ++IOFun ++Lang ++Ops ++SpecFun ++SupportPkg 一键获取MATLAB硬件支持包 ++UITools +每个代码文件内部都有详细文档,可以用doc命令查看。 + ${PROJECT_ROOT}\图标.png + 9.1.0 + ${PROJECT_ROOT}\埃博拉酱 的 MATLAB 扩展 Extension.mltbx + + + + + b344599a-983e-4a6c-bd99-ed3a1bdd9626 + % List files contained in your toolbox folder that you would like to exclude +% from packaging. Excludes should be listed relative to the toolbox folder. +% Some examples of how to specify excludes are provided below: +% +% A single file in the toolbox folder: +% .svn +% +% A single file in a subfolder of the toolbox folder: +% example/.svn +% +% All files in a subfolder of the toolbox folder: +% example/* +% +% All files of a certain name in all subfolders of the toolbox folder: +% **/.svn +% +% All files matching a pattern in all subfolders of the toolbox folder: +% **/*.bak +% +.git* +.resources/project +**/*.asv +.vs +packages +**/*.mltbx +**/*.exp +**/*.lib +**/*.pdb +Windows平台 +**/*.sln + true + + + + + + + + + false + + + + + + R2021a + latest + false + true + false + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${PROJECT_ROOT} + + + ${PROJECT_ROOT}\+MATLAB + ${PROJECT_ROOT}\README.md + ${PROJECT_ROOT}\resources + ${PROJECT_ROOT}\图标.png + ${PROJECT_ROOT}\示例数据 + + + + + + C:\Users\张天夫\Documents\MATLAB\MATLAB扩展\埃博拉酱 的 MATLAB 扩展 Extension.mltbx + + + + C:\Program Files\MATLAB\R2022a + + + + false + false + true + false + false + false + false + false + 10.0 + false + true + win64 + true + + \ No newline at end of file