exiftool-vendored.exe 12.82.0 → 12.82.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/bin/exiftool.exe +0 -0
- package/bin/exiftool_files/Licenses_Strawberry_Perl.zip +0 -0
- package/bin/exiftool_files/lib/Archive/Zip/Archive.pm +399 -65
- package/bin/exiftool_files/lib/Archive/Zip/DirectoryMember.pm +1 -1
- package/bin/exiftool_files/lib/Archive/Zip/FileMember.pm +1 -1
- package/bin/exiftool_files/lib/Archive/Zip/Member.pm +499 -195
- package/bin/exiftool_files/lib/Archive/Zip/NewFileMember.pm +1 -1
- package/bin/exiftool_files/lib/Archive/Zip/StringMember.pm +2 -2
- package/bin/exiftool_files/lib/Archive/Zip/ZipFileMember.pm +79 -20
- package/bin/exiftool_files/lib/Archive/Zip.pm +179 -29
- package/bin/exiftool_files/lib/AutoLoader.pm +453 -0
- package/bin/exiftool_files/lib/B/Deparse.pm +209 -137
- package/bin/exiftool_files/lib/B.pm +1 -1
- package/bin/exiftool_files/lib/Benchmark.pm +1123 -0
- package/bin/exiftool_files/lib/Class/Struct.pm +2 -2
- package/bin/exiftool_files/lib/Compress/Raw/Bzip2.pm +14 -9
- package/bin/exiftool_files/lib/Compress/Raw/Lzma.pm +982 -0
- package/bin/exiftool_files/lib/Compress/Raw/Zlib.pm +91 -86
- package/bin/exiftool_files/lib/Compress/Zlib.pm +105 -100
- package/bin/exiftool_files/lib/Config.pm +9 -9
- package/bin/exiftool_files/lib/Config_heavy.pl +36 -33
- package/bin/exiftool_files/lib/CryptX.pm +2 -82
- package/bin/exiftool_files/lib/Data/Dumper.pm +2 -2
- package/bin/exiftool_files/lib/Digest/MD5.pm +12 -9
- package/bin/exiftool_files/lib/Digest/Perl/MD5.pm +1 -191
- package/bin/exiftool_files/lib/Digest/base.pm +26 -20
- package/bin/exiftool_files/lib/DynaLoader.pm +7 -4
- package/bin/exiftool_files/lib/Encode.pm +3 -3
- package/bin/exiftool_files/lib/Errno.pm +13 -13
- package/bin/exiftool_files/lib/Exporter/Heavy.pm +2 -2
- package/bin/exiftool_files/lib/Exporter.pm +1 -1
- package/bin/exiftool_files/lib/ExtUtils/Command/MM.pm +323 -0
- package/bin/exiftool_files/lib/ExtUtils/Command.pm +382 -0
- package/bin/exiftool_files/lib/File/Find.pm +1 -1
- package/bin/exiftool_files/lib/File/Glob.pm +1 -8
- package/bin/exiftool_files/lib/File/GlobMapper.pm +2 -2
- package/bin/exiftool_files/lib/File/HomeDir/Darwin/Carbon.pm +2 -40
- package/bin/exiftool_files/lib/File/HomeDir/Darwin/Cocoa.pm +2 -34
- package/bin/exiftool_files/lib/File/HomeDir/Darwin.pm +2 -28
- package/bin/exiftool_files/lib/File/HomeDir/Driver.pm +2 -35
- package/bin/exiftool_files/lib/File/HomeDir/FreeDesktop.pm +2 -62
- package/bin/exiftool_files/lib/File/HomeDir/MacOS9.pm +2 -53
- package/bin/exiftool_files/lib/File/HomeDir/Test.pm +2 -43
- package/bin/exiftool_files/lib/File/HomeDir/Unix.pm +2 -53
- package/bin/exiftool_files/lib/File/HomeDir/Windows.pm +2 -69
- package/bin/exiftool_files/lib/File/HomeDir.pm +5 -416
- package/bin/exiftool_files/lib/File/Path.pm +3 -3
- package/bin/exiftool_files/lib/File/Spec/Win32.pm +2 -2
- package/bin/exiftool_files/lib/File/Temp.pm +70 -35
- package/bin/exiftool_files/lib/File/Which.pm +1 -240
- package/bin/exiftool_files/lib/File/stat.pm +3 -2
- package/bin/exiftool_files/lib/IO/Compress/Adapter/Bzip2.pm +16 -17
- package/bin/exiftool_files/lib/IO/Compress/Adapter/Deflate.pm +19 -20
- package/bin/exiftool_files/lib/IO/Compress/Base/Common.pm +5 -5
- package/bin/exiftool_files/lib/IO/Compress/Base.pm +35 -26
- package/bin/exiftool_files/lib/IO/Compress/Brotli.pm +159 -0
- package/bin/exiftool_files/lib/IO/Compress/Bzip2.pm +50 -25
- package/bin/exiftool_files/lib/IO/Compress/Gzip/Constants.pm +6 -6
- package/bin/exiftool_files/lib/IO/Compress/Gzip.pm +58 -32
- package/bin/exiftool_files/lib/IO/Compress/RawDeflate.pm +63 -38
- package/bin/exiftool_files/lib/IO/Compress/Zlib/Extra.pm +20 -20
- package/bin/exiftool_files/lib/IO/Dir.pm +1 -1
- package/bin/exiftool_files/lib/IO/File.pm +1 -1
- package/bin/exiftool_files/lib/IO/Handle.pm +1 -21
- package/bin/exiftool_files/lib/IO/Pipe.pm +1 -1
- package/bin/exiftool_files/lib/IO/Seekable.pm +1 -1
- package/bin/exiftool_files/lib/IO/Select.pm +16 -2
- package/bin/exiftool_files/lib/IO/Socket/INET.pm +14 -9
- package/bin/exiftool_files/lib/IO/Socket/UNIX.pm +17 -1
- package/bin/exiftool_files/lib/IO/Socket.pm +474 -126
- package/bin/exiftool_files/lib/IO/String.pm +425 -0
- package/bin/exiftool_files/lib/IO/Uncompress/Adapter/Inflate.pm +13 -14
- package/bin/exiftool_files/lib/IO/Uncompress/Base.pm +142 -132
- package/bin/exiftool_files/lib/IO/Uncompress/Brotli.pm +119 -0
- package/bin/exiftool_files/lib/IO/Uncompress/Gunzip.pm +43 -37
- package/bin/exiftool_files/lib/IO/Uncompress/RawInflate.pm +49 -43
- package/bin/exiftool_files/lib/IO.pm +2 -2
- package/bin/exiftool_files/lib/List/Util.pm +97 -8
- package/bin/exiftool_files/lib/MIME/Base64.pm +5 -5
- package/bin/exiftool_files/lib/MIME/Charset/_Compat.pm +106 -0
- package/bin/exiftool_files/lib/MIME/Charset.pm +1303 -0
- package/bin/exiftool_files/lib/Math/BigFloat.pm +444 -27
- package/bin/exiftool_files/lib/Math/BigInt/Calc.pm +296 -313
- package/bin/exiftool_files/lib/Math/BigInt/FastCalc.pm +1 -1
- package/bin/exiftool_files/lib/Math/BigInt/GMP.pm +2 -115
- package/bin/exiftool_files/lib/Math/BigInt/LTM.pm +2 -24
- package/bin/exiftool_files/lib/Math/BigInt/Lib.pm +61 -32
- package/bin/exiftool_files/lib/Math/BigInt.pm +292 -107
- package/bin/exiftool_files/lib/POSIX.pm +1 -1
- package/bin/exiftool_files/lib/PerlIO/scalar.pm +41 -0
- package/bin/exiftool_files/lib/PerlIO.pm +397 -0
- package/bin/exiftool_files/lib/Portable/CPAN.pm +94 -94
- package/bin/exiftool_files/lib/Portable/Config.pm +94 -94
- package/bin/exiftool_files/lib/Portable/FileSpec.pm +180 -180
- package/bin/exiftool_files/lib/Portable/HomeDir.pm +110 -110
- package/bin/exiftool_files/lib/Portable/LoadYaml.pm +430 -430
- package/bin/exiftool_files/lib/Portable/minicpan.pm +55 -55
- package/bin/exiftool_files/lib/Portable.pm +246 -320
- package/bin/exiftool_files/lib/Scalar/Util.pm +9 -4
- package/bin/exiftool_files/lib/Socket.pm +16 -12
- package/bin/exiftool_files/lib/Storable.pm +1444 -1441
- package/bin/exiftool_files/lib/TAP/Base.pm +133 -0
- package/bin/exiftool_files/lib/TAP/Formatter/Base.pm +467 -0
- package/bin/exiftool_files/lib/TAP/Formatter/Color.pm +116 -0
- package/bin/exiftool_files/lib/TAP/Formatter/Console/ParallelSession.pm +201 -0
- package/bin/exiftool_files/lib/TAP/Formatter/Console/Session.pm +205 -0
- package/bin/exiftool_files/lib/TAP/Formatter/Console.pm +100 -0
- package/bin/exiftool_files/lib/TAP/Formatter/File/Session.pm +95 -0
- package/bin/exiftool_files/lib/TAP/Formatter/File.pm +56 -0
- package/bin/exiftool_files/lib/TAP/Formatter/Session.pm +220 -0
- package/bin/exiftool_files/lib/TAP/Harness/Beyond.pod +426 -0
- package/bin/exiftool_files/lib/TAP/Harness/Env.pm +215 -0
- package/bin/exiftool_files/lib/TAP/Harness.pm +1054 -0
- package/bin/exiftool_files/lib/TAP/Object.pm +155 -0
- package/bin/exiftool_files/lib/TAP/Parser/Aggregator.pm +414 -0
- package/bin/exiftool_files/lib/TAP/Parser/Grammar.pm +584 -0
- package/bin/exiftool_files/lib/TAP/Parser/Iterator/Array.pm +100 -0
- package/bin/exiftool_files/lib/TAP/Parser/Iterator/Process.pm +378 -0
- package/bin/exiftool_files/lib/TAP/Parser/Iterator/Stream.pm +116 -0
- package/bin/exiftool_files/lib/TAP/Parser/Iterator.pm +162 -0
- package/bin/exiftool_files/lib/TAP/Parser/IteratorFactory.pm +339 -0
- package/bin/exiftool_files/lib/TAP/Parser/Multiplexer.pm +194 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/Bailout.pm +62 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/Comment.pm +60 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/Plan.pm +119 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/Pragma.pm +62 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/Test.pm +271 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/Unknown.pm +48 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/Version.pm +62 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/YAML.pm +61 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result.pm +297 -0
- package/bin/exiftool_files/lib/TAP/Parser/ResultFactory.pm +183 -0
- package/bin/exiftool_files/lib/TAP/Parser/Scheduler/Job.pm +127 -0
- package/bin/exiftool_files/lib/TAP/Parser/Scheduler/Spinner.pm +61 -0
- package/bin/exiftool_files/lib/TAP/Parser/Scheduler.pm +448 -0
- package/bin/exiftool_files/lib/TAP/Parser/Source.pm +381 -0
- package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/Executable.pm +184 -0
- package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/File.pm +136 -0
- package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/Handle.pm +124 -0
- package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/Perl.pm +370 -0
- package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/RawTAP.pm +130 -0
- package/bin/exiftool_files/lib/TAP/Parser/SourceHandler.pm +191 -0
- package/bin/exiftool_files/lib/TAP/Parser/YAMLish/Reader.pm +332 -0
- package/bin/exiftool_files/lib/TAP/Parser/YAMLish/Writer.pm +254 -0
- package/bin/exiftool_files/lib/TAP/Parser.pm +1931 -0
- package/bin/exiftool_files/lib/Test/Builder/Formatter.pm +107 -0
- package/bin/exiftool_files/lib/Test/Builder/IO/Scalar.pm +659 -0
- package/bin/exiftool_files/lib/Test/Builder/Module.pm +182 -0
- package/bin/exiftool_files/lib/Test/Builder/Tester/Color.pm +51 -0
- package/bin/exiftool_files/lib/Test/Builder/Tester.pm +675 -0
- package/bin/exiftool_files/lib/Test/Builder/TodoDiag.pm +68 -0
- package/bin/exiftool_files/lib/Test/Builder.pm +2653 -0
- package/bin/exiftool_files/lib/Test/Harness.pm +618 -0
- package/bin/exiftool_files/lib/Test/More.pm +1997 -0
- package/bin/exiftool_files/lib/Test/Simple.pm +220 -0
- package/bin/exiftool_files/lib/Test/Tester/Capture.pm +241 -0
- package/bin/exiftool_files/lib/Test/Tester/CaptureRunner.pm +79 -0
- package/bin/exiftool_files/lib/Test/Tester/Delegate.pm +45 -0
- package/bin/exiftool_files/lib/Test/Tester.pm +695 -0
- package/bin/exiftool_files/lib/Test/Tutorial.pod +618 -0
- package/bin/exiftool_files/lib/Test/use/ok.pm +64 -0
- package/bin/exiftool_files/lib/Text/ParseWords.pm +303 -0
- package/bin/exiftool_files/lib/Tie/StdHandle.pm +2 -2
- package/bin/exiftool_files/lib/Time/HiRes.pm +73 -68
- package/bin/exiftool_files/lib/Time/Local.pm +82 -35
- package/bin/exiftool_files/lib/Time/Piece.pm +19 -4
- package/bin/exiftool_files/lib/Time/Seconds.pm +1 -1
- package/bin/exiftool_files/lib/UNIVERSAL.pm +203 -0
- package/bin/exiftool_files/lib/Unicode/GCString.pm +60 -0
- package/bin/exiftool_files/lib/Unicode/LineBreak/Constants.pm +68 -0
- package/bin/exiftool_files/lib/Unicode/LineBreak.pm +248 -0
- package/bin/exiftool_files/lib/Win32/API/Struct.pm +1 -177
- package/bin/exiftool_files/lib/Win32/API/Type.pm +1 -100
- package/bin/exiftool_files/lib/Win32/API.pm +1 -830
- package/bin/exiftool_files/lib/Win32/FindFile.pm +2 -123
- package/bin/exiftool_files/lib/Win32.pm +213 -89
- package/bin/exiftool_files/lib/Win32API/File.pm +1 -1
- package/bin/exiftool_files/lib/auto/B/B.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Compress/Raw/Bzip2/Bzip2.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Compress/Raw/Lzma/Lzma.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Compress/Raw/Lzma/autosplit.ix +3 -0
- package/bin/exiftool_files/lib/auto/Compress/Raw/Zlib/Zlib.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/CryptX/CryptX.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Cwd/Cwd.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Data/Dumper/Dumper.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Digest/MD5/MD5.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Digest/SHA/SHA.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Encode/Encode.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Fcntl/Fcntl.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/File/Glob/Glob.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/IO/Compress/Brotli/Brotli.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/IO/IO.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/List/Util/Util.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/MIME/Base64/Base64.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Math/BigInt/FastCalc/FastCalc.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Math/BigInt/GMP/GMP.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/POSIX/POSIX.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/PerlIO/scalar/scalar.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Socket/Socket.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Storable/Storable.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Time/HiRes/HiRes.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Time/Piece/Piece.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Unicode/LineBreak/LineBreak.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Win32/API/API.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Win32/FindFile/FindFile.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Win32/Win32.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Win32API/File/File.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/mro/mro.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/re/re.xs.dll +0 -0
- package/bin/exiftool_files/lib/feature.pm +49 -17
- package/bin/exiftool_files/lib/mro.pm +4 -20
- package/bin/exiftool_files/lib/overload.pm +15 -15
- package/bin/exiftool_files/lib/parent.pm +10 -2
- package/bin/exiftool_files/lib/re.pm +91 -33
- package/bin/exiftool_files/lib/warnings.pm +17 -6
- package/bin/exiftool_files/libgcc_s_seh-1.dll +0 -0
- package/bin/exiftool_files/liblzma-5__.dll +0 -0
- package/bin/exiftool_files/libstdc++-6.dll +0 -0
- package/bin/exiftool_files/libwinpthread-1.dll +0 -0
- package/bin/exiftool_files/perl.exe +0 -0
- package/bin/exiftool_files/perl532.dll +0 -0
- package/package.json +5 -3
- package/bin/exiftool_files/libgcc_s_dw2-1.dll +0 -0
- package/bin/exiftool_files/perl530.dll +0 -0
|
@@ -77,127 +77,6 @@ sub ReadDir{
|
|
|
77
77
|
__END__
|
|
78
78
|
# Below is stub documentation for your module. You'd better edit it!
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
#line 185
|
|
81
81
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
=head1 SYNOPSIS
|
|
85
|
-
|
|
86
|
-
use Win32::FindFile;
|
|
87
|
-
use bytes;
|
|
88
|
-
|
|
89
|
-
my @txt_files = FindFile( "*.txt" );
|
|
90
|
-
my @dir_content = ReadDir( "." );
|
|
91
|
-
|
|
92
|
-
# and finally
|
|
93
|
-
# print entire directory content in unicode
|
|
94
|
-
#
|
|
95
|
-
for ( @dir_content ){
|
|
96
|
-
next unless $file->is_entry # skip over '.', '..'
|
|
97
|
-
next if $file->is_hidden; # skip over hidden files
|
|
98
|
-
next if $file->is_system; # etc
|
|
99
|
-
|
|
100
|
-
next if $file->ftCreationTime > time -10; # skip over files created recently
|
|
101
|
-
next if $file->ftLastWriteTime > time -10;
|
|
102
|
-
next if $file->ftLastAccessTime > time -10;
|
|
103
|
-
|
|
104
|
-
next if $file->FileSize == 0; #
|
|
105
|
-
|
|
106
|
-
print $file->relName( "$dirname" ), "\n" ; # same as "dirname/$file" (Unix style)
|
|
107
|
-
print $file->relName( "$dirname", "\\" ), "\n" ; # same as "dirname\\$file" (Win style)
|
|
108
|
-
|
|
109
|
-
print $file, "\n"; # $file->cFileName
|
|
110
|
-
print $file->dosName, "\n";
|
|
111
|
-
|
|
112
|
-
my $s = $file->dwFileAttributes; # Get all attribytes
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
print "Current directory is ", GetCurrentDirectory(), "\n";
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
=head1 DESCRIPTION
|
|
120
|
-
|
|
121
|
-
Win32::FindFile are simple tool for reading unicode dir content. It call kernel32.dll unicode functions
|
|
122
|
-
FindFirstFileW, FindNextFileW, and covert UTF-16 to utf8 and back there is needed.
|
|
123
|
-
|
|
124
|
-
Main Function is FindFile that take pattern of form '*' or '$directory\*' or more complex "$directory\*.txt"
|
|
125
|
-
and return records from FileFileNextW as Class.
|
|
126
|
-
|
|
127
|
-
Other function are utility functions as Copy, Move, GetCurrentDirectory, SetCurrentDirectory, ... etc.
|
|
128
|
-
|
|
129
|
-
=head2 EXPORT
|
|
130
|
-
|
|
131
|
-
=head3 C<FindFile>
|
|
132
|
-
|
|
133
|
-
FindFile( $GlobPattern );
|
|
134
|
-
|
|
135
|
-
@file_matches = FindFile( "$Dir\*" ) or "warn not files match";
|
|
136
|
-
@file_matches = FindFile( "*" ) ; # list current directory;
|
|
137
|
-
@file_matches = FindFile( "A*") ; # list files beginning with A letter
|
|
138
|
-
|
|
139
|
-
=head3 C<GetCurrentDirectory>
|
|
140
|
-
|
|
141
|
-
$curpwd = CurrentDirectory();
|
|
142
|
-
|
|
143
|
-
=head3 C<SetCurrentDirectory>
|
|
144
|
-
|
|
145
|
-
SetCurrentDirectory( $next_curpwd ); # set current directory
|
|
146
|
-
|
|
147
|
-
=head3 C<GetFullPathName>
|
|
148
|
-
|
|
149
|
-
$absolute_path = GetFullPathName( $filename )
|
|
150
|
-
|
|
151
|
-
Expand file name to absolute path
|
|
152
|
-
|
|
153
|
-
=over 4
|
|
154
|
-
EXPORT
|
|
155
|
-
|
|
156
|
-
=item DeleteFile( $file )
|
|
157
|
-
|
|
158
|
-
=item CopyFile($from, $to, $fail_if_overwrite)
|
|
159
|
-
|
|
160
|
-
=item MoveFile($from, $to)
|
|
161
|
-
|
|
162
|
-
=item RemoveDirectory( $dir )
|
|
163
|
-
|
|
164
|
-
=item CreateDirectory( $dir )
|
|
165
|
-
|
|
166
|
-
=item GetBinaryType( $file )
|
|
167
|
-
|
|
168
|
-
=item GetCompressedFileSize($file)
|
|
169
|
-
|
|
170
|
-
=item GetFileAttributes($file)
|
|
171
|
-
|
|
172
|
-
=item GetFileAttributes( $file, $attr )
|
|
173
|
-
|
|
174
|
-
=item GetLongPathName( $file )
|
|
175
|
-
|
|
176
|
-
=item AreFileApisANSI
|
|
177
|
-
|
|
178
|
-
=item SetFileApisToOEM
|
|
179
|
-
|
|
180
|
-
=item SetFileApisToANSI
|
|
181
|
-
|
|
182
|
-
=back
|
|
183
|
-
|
|
184
|
-
=cut
|
|
185
|
-
|
|
186
|
-
=head1 SEE ALSO
|
|
187
|
-
|
|
188
|
-
L<Win32>, L<Win32API>, L<Win32::UNICODE>, L<Win32::LongPath>
|
|
189
|
-
|
|
190
|
-
=head1 AUTHOR
|
|
191
|
-
|
|
192
|
-
A. G. Grishaev, E<lt>grian@cpan.orgE<gt>
|
|
193
|
-
|
|
194
|
-
=head1 COPYRIGHT AND LICENSE
|
|
195
|
-
|
|
196
|
-
Copyright (C) 2014 by A. G. Grishaev
|
|
197
|
-
|
|
198
|
-
This library is free software; you can redistribute it and/or modify
|
|
199
|
-
it under the same terms as Perl itself, either Perl version 5.10.1 or,
|
|
200
|
-
at your option, any later version of Perl 5 you may have available.
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
=cut
|
|
82
|
+
#line 204
|
|
@@ -8,7 +8,7 @@ package Win32;
|
|
|
8
8
|
require DynaLoader;
|
|
9
9
|
|
|
10
10
|
@ISA = qw|Exporter DynaLoader|;
|
|
11
|
-
$VERSION = '0.
|
|
11
|
+
$VERSION = '0.54';
|
|
12
12
|
$XS_VERSION = $VERSION;
|
|
13
13
|
$VERSION = eval $VERSION;
|
|
14
14
|
|
|
@@ -174,6 +174,7 @@ sub VER_SUITE_STORAGE_SERVER () { 0x00002000 } # Windows Storage Serve
|
|
|
174
174
|
sub VER_SUITE_TERMINAL () { 0x00000010 } # Terminal Services is installed. This value is always set.
|
|
175
175
|
# If VER_SUITE_TERMINAL is set but VER_SUITE_SINGLEUSERTS is not set, the system is running in application server mode.
|
|
176
176
|
sub VER_SUITE_WH_SERVER () { 0x00008000 } # Windows Home Server is installed.
|
|
177
|
+
sub VER_SUITE_MULTIUSERTS () { 0x00020000 } # AppServer mode is enabled.
|
|
177
178
|
|
|
178
179
|
|
|
179
180
|
sub SM_TABLETPC () { 86 }
|
|
@@ -359,7 +360,8 @@ sub GetOSDisplayName {
|
|
|
359
360
|
$desc =~ s/^\s*//;
|
|
360
361
|
s/(200.)/$name Server $1/;
|
|
361
362
|
}
|
|
362
|
-
s/^Windows (20(03|08|12))/Windows Server $1/;
|
|
363
|
+
s/^Windows (20(03|08|12|16|19))/Windows Server $1/;
|
|
364
|
+
s/^Windows SAC/Windows Server/;
|
|
363
365
|
}
|
|
364
366
|
}
|
|
365
367
|
$name .= " $desc" if length $desc;
|
|
@@ -528,12 +530,12 @@ sub _GetOSName {
|
|
|
528
530
|
}
|
|
529
531
|
}
|
|
530
532
|
elsif ($minor == 2) {
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
533
|
+
if ($producttype == VER_NT_WORKSTATION) {
|
|
534
|
+
$os = "8";
|
|
535
|
+
}
|
|
536
|
+
else {
|
|
537
|
+
$os = "2012";
|
|
538
|
+
}
|
|
537
539
|
}
|
|
538
540
|
elsif ($minor == 3) {
|
|
539
541
|
if ($producttype == VER_NT_WORKSTATION) {
|
|
@@ -546,64 +548,130 @@ sub _GetOSName {
|
|
|
546
548
|
}
|
|
547
549
|
}
|
|
548
550
|
elsif ($major == 10) {
|
|
549
|
-
$
|
|
551
|
+
if ($producttype == VER_NT_WORKSTATION) {
|
|
552
|
+
# Build numbers from https://en.wikipedia.org/wiki/Windows_10_version_history
|
|
553
|
+
$os = '10';
|
|
554
|
+
if (9841 <= $build && $build <= 10240) {
|
|
555
|
+
$desc = " Version 1507";
|
|
556
|
+
$desc .= " (Preview Build $build)" if $build < 10240;
|
|
557
|
+
$desc .= " (RTM)" if $build == 10240;
|
|
558
|
+
}
|
|
559
|
+
elsif (10525 <= $build && $build <= 10586) {
|
|
560
|
+
$desc = " Version 1511 (November Update)";
|
|
561
|
+
$desc .= " (Preview Build $build)" if $build < 10586;
|
|
562
|
+
}
|
|
563
|
+
elsif (11082 <= $build && $build <= 14393) {
|
|
564
|
+
$desc = " Version 1607 (Anniversary Update)";
|
|
565
|
+
$desc .= " (Preview Build $build)" if $build < 14393;
|
|
566
|
+
}
|
|
567
|
+
elsif (14901 <= $build && $build <= 15063) {
|
|
568
|
+
$desc = " Version 1703 (Creators Update)";
|
|
569
|
+
$desc .= " (Preview Build $build)" if $build < 15063;
|
|
570
|
+
}
|
|
571
|
+
elsif (16170 <= $build && $build <= 16299) {
|
|
572
|
+
$desc = " Version 1709 (Fall Creators Update)";
|
|
573
|
+
$desc .= " (Preview Build $build)" if $build < 16299;
|
|
574
|
+
}
|
|
575
|
+
elsif (16353 <= $build && $build <= 17134) {
|
|
576
|
+
$desc = " Version 1803 (April 2018 Update)";
|
|
577
|
+
$desc .= " (Preview Build $build)" if $build < 17134;
|
|
578
|
+
}
|
|
579
|
+
elsif (17604 <= $build && $build <= 17763) {
|
|
580
|
+
$desc = " Version 1809 (October 2018 Update)";
|
|
581
|
+
$desc .= " (Preview Build $build)" if $build < 17763;
|
|
582
|
+
}
|
|
583
|
+
elsif (18204 <= $build && $build <= 18362) {
|
|
584
|
+
$desc = " Version 1903 (May 2019 Update)";
|
|
585
|
+
$desc .= " (Preview Build $build)" if $build < 18362;
|
|
586
|
+
}
|
|
587
|
+
else {
|
|
588
|
+
$desc = " Build $build";
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
else {
|
|
592
|
+
if ($build == 14393) {
|
|
593
|
+
$os = "2016";
|
|
594
|
+
$desc = "Version 1607";
|
|
595
|
+
}
|
|
596
|
+
elsif ($build == 17763) {
|
|
597
|
+
$os = "2019";
|
|
598
|
+
$desc = "Version 1809";
|
|
599
|
+
}
|
|
600
|
+
else {
|
|
601
|
+
$os = "Server";
|
|
602
|
+
if ($build == 16299) {
|
|
603
|
+
$desc = "Version 1709";
|
|
604
|
+
}
|
|
605
|
+
elsif ($build == 17134) {
|
|
606
|
+
$desc = "Version 1803";
|
|
607
|
+
}
|
|
608
|
+
elsif ($build == 18362) {
|
|
609
|
+
$desc = "Version 1903";
|
|
610
|
+
}
|
|
611
|
+
else {
|
|
612
|
+
$desc = "Build $build";
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
}
|
|
550
616
|
}
|
|
551
617
|
|
|
552
618
|
if ($major >= 6) {
|
|
553
|
-
if ($
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
619
|
+
if ($major == 6) {
|
|
620
|
+
if ($productinfo == PRODUCT_ULTIMATE) {
|
|
621
|
+
$desc .= " Ultimate";
|
|
622
|
+
}
|
|
623
|
+
elsif ($productinfo == PRODUCT_HOME_PREMIUM) {
|
|
624
|
+
$desc .= " Home Premium";
|
|
625
|
+
}
|
|
626
|
+
elsif ($productinfo == PRODUCT_HOME_BASIC) {
|
|
627
|
+
$desc .= " Home Basic";
|
|
628
|
+
}
|
|
629
|
+
elsif ($productinfo == PRODUCT_ENTERPRISE) {
|
|
630
|
+
$desc .= " Enterprise";
|
|
631
|
+
}
|
|
632
|
+
elsif ($productinfo == PRODUCT_BUSINESS) {
|
|
633
|
+
# "Windows 7 Business" had a name change to "Windows 7 Professional"
|
|
634
|
+
$desc .= $minor == 0 ? " Business" : " Professional";
|
|
635
|
+
}
|
|
636
|
+
elsif ($productinfo == PRODUCT_STARTER) {
|
|
637
|
+
$desc .= " Starter";
|
|
638
|
+
}
|
|
639
|
+
elsif ($productinfo == PRODUCT_CLUSTER_SERVER) {
|
|
640
|
+
$desc .= " HPC Server";
|
|
641
|
+
}
|
|
642
|
+
elsif ($productinfo == PRODUCT_DATACENTER_SERVER) {
|
|
643
|
+
$desc .= " Datacenter";
|
|
644
|
+
}
|
|
645
|
+
elsif ($productinfo == PRODUCT_DATACENTER_SERVER_CORE) {
|
|
646
|
+
$desc .= " Datacenter Edition (core installation)";
|
|
647
|
+
}
|
|
648
|
+
elsif ($productinfo == PRODUCT_ENTERPRISE_SERVER) {
|
|
649
|
+
$desc .= " Enterprise";
|
|
650
|
+
}
|
|
651
|
+
elsif ($productinfo == PRODUCT_ENTERPRISE_SERVER_CORE) {
|
|
652
|
+
$desc .= " Enterprise Edition (core installation)";
|
|
653
|
+
}
|
|
654
|
+
elsif ($productinfo == PRODUCT_ENTERPRISE_SERVER_IA64) {
|
|
655
|
+
$desc .= " Enterprise Edition for Itanium-based Systems";
|
|
656
|
+
}
|
|
657
|
+
elsif ($productinfo == PRODUCT_SMALLBUSINESS_SERVER) {
|
|
658
|
+
$desc .= " Small Business Server";
|
|
659
|
+
}
|
|
660
|
+
elsif ($productinfo == PRODUCT_SMALLBUSINESS_SERVER_PREMIUM) {
|
|
661
|
+
$desc .= " Small Business Server Premium Edition";
|
|
662
|
+
}
|
|
663
|
+
elsif ($productinfo == PRODUCT_STANDARD_SERVER) {
|
|
664
|
+
$desc .= " Standard";
|
|
665
|
+
}
|
|
666
|
+
elsif ($productinfo == PRODUCT_STANDARD_SERVER_CORE) {
|
|
667
|
+
$desc .= " Standard Edition (core installation)";
|
|
668
|
+
}
|
|
669
|
+
elsif ($productinfo == PRODUCT_WEB_SERVER) {
|
|
670
|
+
$desc .= " Web Server";
|
|
671
|
+
}
|
|
672
|
+
elsif ($productinfo == PRODUCT_PROFESSIONAL) {
|
|
673
|
+
$desc .= " Professional";
|
|
674
|
+
}
|
|
607
675
|
}
|
|
608
676
|
|
|
609
677
|
if ($arch == PROCESSOR_ARCHITECTURE_INTEL) {
|
|
@@ -612,7 +680,7 @@ sub _GetOSName {
|
|
|
612
680
|
elsif ($arch == PROCESSOR_ARCHITECTURE_AMD64) {
|
|
613
681
|
$desc .= " (64-bit)";
|
|
614
682
|
}
|
|
615
|
-
}
|
|
683
|
+
}
|
|
616
684
|
}
|
|
617
685
|
|
|
618
686
|
unless (defined $os) {
|
|
@@ -998,6 +1066,10 @@ GetOSVersion() in list context.
|
|
|
998
1066
|
The description will also include tags for other special editions,
|
|
999
1067
|
like "R2", "Media Center", "Tablet PC", or "Starter Edition".
|
|
1000
1068
|
|
|
1069
|
+
In the Windows 10 / Server Semi-Annual Channel era, the description may
|
|
1070
|
+
contain the relevant ReleaseId value, but this is only inferred from
|
|
1071
|
+
the build number, not determined absolutely.
|
|
1072
|
+
|
|
1001
1073
|
Currently the possible values for the OS name are
|
|
1002
1074
|
|
|
1003
1075
|
WinWin32s
|
|
@@ -1013,6 +1085,12 @@ Currently the possible values for the OS name are
|
|
|
1013
1085
|
WinVista
|
|
1014
1086
|
Win2008
|
|
1015
1087
|
Win7
|
|
1088
|
+
Win8
|
|
1089
|
+
Win8.1
|
|
1090
|
+
Win10
|
|
1091
|
+
Win2016
|
|
1092
|
+
Win2019
|
|
1093
|
+
WinSAC
|
|
1016
1094
|
|
|
1017
1095
|
This routine is just a simple interface into GetOSVersion(). More
|
|
1018
1096
|
specific or demanding situations should use that instead. Another
|
|
@@ -1038,30 +1116,36 @@ For the ID, the values are 0 for Win32s, 1 for Windows 9X/Me and 2 for
|
|
|
1038
1116
|
Windows NT/2000/XP/2003/Vista/2008/7. In scalar context it returns just
|
|
1039
1117
|
the ID.
|
|
1040
1118
|
|
|
1041
|
-
Currently known values for ID MAJOR and
|
|
1042
|
-
|
|
1043
|
-
OS ID MAJOR MINOR
|
|
1044
|
-
Win32s 0 - -
|
|
1045
|
-
Windows 95 1 4 0
|
|
1046
|
-
Windows 98 1 4 10
|
|
1047
|
-
Windows Me 1 4 90
|
|
1048
|
-
|
|
1049
|
-
Windows NT 3.51 2 3 51
|
|
1050
|
-
Windows NT 4 2 4 0
|
|
1051
|
-
|
|
1052
|
-
Windows 2000 2 5 0
|
|
1053
|
-
Windows XP 2 5 1
|
|
1054
|
-
Windows Server 2003 2 5 2
|
|
1055
|
-
Windows Server 2003 R2 2 5 2
|
|
1056
|
-
Windows Home Server 2 5 2
|
|
1057
|
-
|
|
1058
|
-
Windows Vista 2 6 0
|
|
1059
|
-
Windows Server 2008 2 6 0
|
|
1060
|
-
Windows 7 2 6 1
|
|
1061
|
-
Windows Server 2008 R2 2 6 1
|
|
1062
|
-
Windows 8 2 6 2
|
|
1063
|
-
Windows Server 2012 2 6 2
|
|
1064
|
-
|
|
1119
|
+
Currently known values for ID MAJOR MINOR and BUILD are as follows:
|
|
1120
|
+
|
|
1121
|
+
OS ID MAJOR MINOR BUILD
|
|
1122
|
+
Win32s 0 - - -
|
|
1123
|
+
Windows 95 1 4 0 -
|
|
1124
|
+
Windows 98 1 4 10 -
|
|
1125
|
+
Windows Me 1 4 90 -
|
|
1126
|
+
|
|
1127
|
+
Windows NT 3.51 2 3 51 -
|
|
1128
|
+
Windows NT 4 2 4 0 -
|
|
1129
|
+
|
|
1130
|
+
Windows 2000 2 5 0 -
|
|
1131
|
+
Windows XP 2 5 1 -
|
|
1132
|
+
Windows Server 2003 2 5 2 -
|
|
1133
|
+
Windows Server 2003 R2 2 5 2 -
|
|
1134
|
+
Windows Home Server 2 5 2 -
|
|
1135
|
+
|
|
1136
|
+
Windows Vista 2 6 0 -
|
|
1137
|
+
Windows Server 2008 2 6 0 -
|
|
1138
|
+
Windows 7 2 6 1 -
|
|
1139
|
+
Windows Server 2008 R2 2 6 1 -
|
|
1140
|
+
Windows 8 2 6 2 -
|
|
1141
|
+
Windows Server 2012 2 6 2 -
|
|
1142
|
+
Windows 8.1 2 6 2 -
|
|
1143
|
+
Windows Server 2012 R2 2 6 2 -
|
|
1144
|
+
|
|
1145
|
+
Windows 10 2 10 0 -
|
|
1146
|
+
Windows Server 2016 2 10 0 14393
|
|
1147
|
+
Windows Server 2019 2 10 0 17677
|
|
1148
|
+
|
|
1065
1149
|
On Windows NT 4 SP6 and later this function returns the following
|
|
1066
1150
|
additional values: SPMAJOR, SPMINOR, SUITEMASK, PRODUCTTYPE.
|
|
1067
1151
|
|
|
@@ -1081,8 +1165,14 @@ The version numbers for Windows 8 and Windows Server 2012 are
|
|
|
1081
1165
|
identical; the PRODUCTTYPE field must be used to differentiate between
|
|
1082
1166
|
them.
|
|
1083
1167
|
|
|
1168
|
+
For modern Windows releases, the major and minor version numbers are
|
|
1169
|
+
identical. The PRODUCTTYPE field must be used to differentiate between
|
|
1170
|
+
Windows 10 and Server releases. The BUILD field is used to
|
|
1171
|
+
differentiate Windows Server versions: currently 2016, 2019, and
|
|
1172
|
+
Semi-Annual Channel releases.
|
|
1173
|
+
|
|
1084
1174
|
SPMAJOR and SPMINOR are the version numbers of the latest
|
|
1085
|
-
installed service pack.
|
|
1175
|
+
installed service pack. (In the Windows 10 era, these are unused.)
|
|
1086
1176
|
|
|
1087
1177
|
SUITEMASK is a bitfield identifying the product suites available on
|
|
1088
1178
|
the system. Known bits are:
|
|
@@ -1103,6 +1193,7 @@ the system. Known bits are:
|
|
|
1103
1193
|
VER_SUITE_STORAGE_SERVER 0x00002000
|
|
1104
1194
|
VER_SUITE_COMPUTE_SERVER 0x00004000
|
|
1105
1195
|
VER_SUITE_WH_SERVER 0x00008000
|
|
1196
|
+
VER_SUITE_MULTIUSERTS 0x00020000
|
|
1106
1197
|
|
|
1107
1198
|
The VER_SUITE_xxx names are listed here to cross reference the Microsoft
|
|
1108
1199
|
documentation. The Win32 module does not provide symbolic names for these
|
|
@@ -1332,4 +1423,37 @@ DllUnregisterServer.
|
|
|
1332
1423
|
|
|
1333
1424
|
=back
|
|
1334
1425
|
|
|
1426
|
+
=head1 CAVEATS
|
|
1427
|
+
|
|
1428
|
+
=head2 Short Path Names
|
|
1429
|
+
|
|
1430
|
+
There are many situations in which modern Windows systems will not have
|
|
1431
|
+
the L<short path name|https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#short-vs-long-names>
|
|
1432
|
+
(also called 8.3 or MS-DOS) alias for long file names available.
|
|
1433
|
+
|
|
1434
|
+
Short path support can be configured system-wide via the registry,
|
|
1435
|
+
but the default on modern systems is to configure short path usage per
|
|
1436
|
+
volume. The configuration for a volume can be queried in a number of ways,
|
|
1437
|
+
but these may either be unreliable or require elevated (administrator)
|
|
1438
|
+
privileges.
|
|
1439
|
+
|
|
1440
|
+
Typically, the configuration for a volume can be queried using the C<fsutil>
|
|
1441
|
+
utility, e.g. C<fsutil 8dot3name query d:>. On the C level, it can be queried
|
|
1442
|
+
with a C<FSCTL_QUERY_PERSISTENT_VOLUME_STATE> request to the
|
|
1443
|
+
C<DeviceIOControl> API call, as described in
|
|
1444
|
+
L<this article|https://www.codeproject.com/Articles/304374/Query-Volume-Setting-for-State-Windows>.
|
|
1445
|
+
However, both of these methods require administrator privileges to work.
|
|
1446
|
+
|
|
1447
|
+
The Win32 module does not perform any per-volume check and simply fetches
|
|
1448
|
+
short path names in the same manner as the underlying Windows API call it
|
|
1449
|
+
uses: If short path names are disabled, the call will still succeed but the
|
|
1450
|
+
long name will actually be returned.
|
|
1451
|
+
|
|
1452
|
+
Note that on volumes where this happens, C<GetANSIPathName> usually cannot be
|
|
1453
|
+
used to return useful filenames for files that contain unicode characters.
|
|
1454
|
+
(In code page 65001, this may still work.) Handling unicode filenames in this
|
|
1455
|
+
legacy manner relies upon C<GetShortPathName> returning 8.3 filenames, but
|
|
1456
|
+
without short name support, it will return the filename with all unicode
|
|
1457
|
+
characters replaced by question mark characters.
|
|
1458
|
+
|
|
1335
1459
|
=cut
|
|
@@ -10,7 +10,7 @@ use Fcntl qw( O_RDONLY O_RDWR O_WRONLY O_APPEND O_BINARY O_TEXT );
|
|
|
10
10
|
use vars qw( $VERSION @ISA );
|
|
11
11
|
use vars qw( @EXPORT @EXPORT_OK @EXPORT_FAIL %EXPORT_TAGS );
|
|
12
12
|
|
|
13
|
-
$VERSION= '0.
|
|
13
|
+
$VERSION= '0.1203_01';
|
|
14
14
|
|
|
15
15
|
use base qw( Exporter DynaLoader Tie::Handle IO::File );
|
|
16
16
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|