winlnk 0.0.3 → 0.0.4
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.
- checksums.yaml +5 -5
- data/lib/winlnk.rb +2 -2
- data/sig/winlnk.rbs +65 -0
- metadata +7 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 1c89f866d4cae7d78f6d7fe3cf2cf75e3c299d671ab74478bcf39c252c909cfa
|
|
4
|
+
data.tar.gz: 662519d49e657dcd7824537c10f700103462782517b82f4986331b7da3d54598
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 602e5fc9ce843a2d355ab2faffa15721414cafd438f50a7d5976269ecc2088892bb64edd63bec0833498693264d3bc5e4717dbd7c6edf9b38235ace30732a7ae
|
|
7
|
+
data.tar.gz: e03146a8b19b587b21cf90e95d54d1c020cd1d031802ea69ad48a66d4513e395df390b13a9fa25cea17cb21bc1ab5fb44d54e14e3cba22769f787632a58ba3b4
|
data/lib/winlnk.rb
CHANGED
|
@@ -144,8 +144,8 @@ class WinLnk
|
|
|
144
144
|
@btime = filetime2posixtime(times[1] << 32 | times[0])
|
|
145
145
|
@atime = filetime2posixtime(times[3] << 32 | times[2])
|
|
146
146
|
@mtime = filetime2posixtime(times[5] << 32 | times[4])
|
|
147
|
-
@file_size, @icon_index, @show_cmd, @hot_key = data(0x34,
|
|
148
|
-
_reserved = data(
|
|
147
|
+
@file_size, @icon_index, @show_cmd, @hot_key = data(0x34, 14).unpack("V3v")
|
|
148
|
+
_reserved = data(0x42, 10).unpack("vV2")
|
|
149
149
|
return 0x4c
|
|
150
150
|
end
|
|
151
151
|
|
data/sig/winlnk.rbs
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
class WinLnk
|
|
2
|
+
MAGIC: String
|
|
3
|
+
CLSID: String
|
|
4
|
+
FLAG_HAS_LINK_TARGET_ID_LIST: Integer
|
|
5
|
+
FLAG_HAS_LINK_INFO: Integer
|
|
6
|
+
FLAG_HAS_NAME: Integer
|
|
7
|
+
FLAG_HAS_RELATIVE_PATH: Integer
|
|
8
|
+
FLAG_HAS_WORKING_DIR: Integer
|
|
9
|
+
FLAG_HAS_ARGUMENTS: Integer
|
|
10
|
+
FLAG_HAS_ICON_LOCATION: Integer
|
|
11
|
+
FLAG_IS_UNICODE: Integer
|
|
12
|
+
ATTR_READONLY: Integer
|
|
13
|
+
ATTR_HIDDEN: Integer
|
|
14
|
+
ATTR_SYSTEM: Integer
|
|
15
|
+
ATTR_DIRECTORY: Integer
|
|
16
|
+
ATTR_ARCHIVE: Integer
|
|
17
|
+
ATTR_NORMAL: Integer
|
|
18
|
+
ATTR_TEMPORARY: Integer
|
|
19
|
+
ATTR_SPARSE_FILE: Integer
|
|
20
|
+
ATTR_REPARSE_POINT: Integer
|
|
21
|
+
ATTR_COMPRESSED: Integer
|
|
22
|
+
ATTR_OFFLINE: Integer
|
|
23
|
+
ATTR_NOT_CONTENT_INDEXED: Integer
|
|
24
|
+
ATTR_ENCRYPTED: Integer
|
|
25
|
+
SW_SHOWNORMAL: Integer
|
|
26
|
+
SW_SHOWMAXIMIZED: Integer
|
|
27
|
+
SW_SHOWMINNOACTIVE: Integer
|
|
28
|
+
LI_FLAG_LOCAL: Integer
|
|
29
|
+
LI_FLAG_NETWORK: Integer
|
|
30
|
+
@codepage: String
|
|
31
|
+
@data: String
|
|
32
|
+
@id_list: Array[String]
|
|
33
|
+
@@debug: (nil | bool)
|
|
34
|
+
|
|
35
|
+
attr_reader flags: Integer
|
|
36
|
+
attr_reader attributes: Integer
|
|
37
|
+
attr_reader btime: Time?
|
|
38
|
+
attr_reader atime: Time?
|
|
39
|
+
attr_reader mtime: Time?
|
|
40
|
+
attr_reader file_size: Integer
|
|
41
|
+
attr_reader icon_index: Integer
|
|
42
|
+
attr_reader show_cmd: Integer
|
|
43
|
+
attr_reader hot_key: Integer
|
|
44
|
+
attr_reader path: String
|
|
45
|
+
attr_reader description: String?
|
|
46
|
+
attr_reader relative_path: String?
|
|
47
|
+
attr_reader working_directory: String?
|
|
48
|
+
attr_reader arguments: String?
|
|
49
|
+
attr_reader icon_location: String?
|
|
50
|
+
def initialize: (String pathname, String codepage) -> void
|
|
51
|
+
|
|
52
|
+
private
|
|
53
|
+
def read_header: -> Integer
|
|
54
|
+
def filetime2posixtime: (Integer filetime) -> Time?
|
|
55
|
+
def read_id_list: (Integer off) -> Integer
|
|
56
|
+
def read_link_info: (Integer off) -> Integer
|
|
57
|
+
def read_string: (Integer off) -> [String, Integer]
|
|
58
|
+
def asciz: (Integer off) -> String
|
|
59
|
+
def utf16z: (Integer off) -> String
|
|
60
|
+
def data: (Integer off, Integer len) -> String
|
|
61
|
+
def make_encodings_be_compatible: (String a, String b) -> void
|
|
62
|
+
|
|
63
|
+
class ParseError < StandardError
|
|
64
|
+
end
|
|
65
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: winlnk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- KAMADA Ken'ichi
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2021-01-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: |
|
|
14
14
|
This is a library to parse Windows Shell Link (shortcut or .lnk) files
|
|
@@ -21,6 +21,7 @@ files:
|
|
|
21
21
|
- README
|
|
22
22
|
- Rakefile
|
|
23
23
|
- lib/winlnk.rb
|
|
24
|
+
- sig/winlnk.rbs
|
|
24
25
|
- test/local_cmd.lnk
|
|
25
26
|
- test/local_unicode.lnk
|
|
26
27
|
- test/local_win31j.lnk
|
|
@@ -34,7 +35,7 @@ homepage: https://github.com/kamadak/winlnk-rb
|
|
|
34
35
|
licenses:
|
|
35
36
|
- BSD-2-Clause
|
|
36
37
|
metadata: {}
|
|
37
|
-
post_install_message:
|
|
38
|
+
post_install_message:
|
|
38
39
|
rdoc_options: []
|
|
39
40
|
require_paths:
|
|
40
41
|
- lib
|
|
@@ -49,9 +50,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
49
50
|
- !ruby/object:Gem::Version
|
|
50
51
|
version: '0'
|
|
51
52
|
requirements: []
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
signing_key:
|
|
53
|
+
rubygems_version: 3.0.3
|
|
54
|
+
signing_key:
|
|
55
55
|
specification_version: 4
|
|
56
56
|
summary: Library to read Windows Shell Link (shortcut or .lnk) files
|
|
57
57
|
test_files: []
|