rbs 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +5 -0
- data/CHANGELOG.md +23 -0
- data/README.md +6 -1
- data/core/array.rbs +2866 -1086
- data/core/basic_object.rbs +150 -30
- data/core/binding.rbs +33 -0
- data/core/builtin.rbs +4 -4
- data/core/class.rbs +43 -5
- data/core/comparable.rbs +57 -0
- data/core/complex.rbs +170 -4
- data/core/constants.rbs +51 -0
- data/core/deprecated.rbs +7 -0
- data/core/dir.rbs +305 -20
- data/core/encoding.rbs +472 -77
- data/core/enumerable.rbs +2173 -234
- data/core/enumerator.rbs +448 -182
- data/core/env.rbs +448 -1
- data/core/errno.rbs +1 -10
- data/core/errors.rbs +152 -2
- data/core/exception.rbs +201 -127
- data/core/false_class.rbs +27 -0
- data/core/fiber.rbs +118 -37
- data/core/fiber_error.rbs +8 -9
- data/core/file.rbs +1059 -139
- data/core/file_test.rbs +287 -32
- data/core/float.rbs +776 -300
- data/core/gc.rbs +185 -34
- data/core/global_variables.rbs +5 -1
- data/core/hash.rbs +1582 -649
- data/core/integer.rbs +974 -204
- data/core/io/buffer.rbs +710 -0
- data/core/io/wait.rbs +29 -8
- data/core/io.rbs +2438 -417
- data/core/kernel.rbs +2315 -316
- data/core/marshal.rbs +37 -2
- data/core/match_data.rbs +123 -6
- data/core/math.rbs +126 -6
- data/core/method.rbs +226 -102
- data/core/module.rbs +421 -45
- data/core/nil_class.rbs +64 -0
- data/core/numeric.rbs +620 -142
- data/core/object.rbs +453 -81
- data/core/object_space.rbs +92 -2
- data/core/proc.rbs +482 -285
- data/core/process.rbs +443 -34
- data/core/ractor.rbs +232 -9
- data/core/random.rbs +151 -52
- data/core/range.rbs +885 -160
- data/core/rational.rbs +122 -6
- data/core/rb_config.rbs +14 -4
- data/core/refinement.rbs +44 -0
- data/core/regexp.rbs +156 -14
- data/core/ruby_vm.rbs +42 -3
- data/core/signal.rbs +78 -39
- data/core/string.rbs +2123 -567
- data/core/string_io.rbs +204 -0
- data/core/struct.rbs +283 -28
- data/core/symbol.rbs +304 -30
- data/core/thread.rbs +1288 -688
- data/core/thread_group.rbs +66 -10
- data/core/time.rbs +643 -217
- data/core/trace_point.rbs +100 -12
- data/core/true_class.rbs +24 -0
- data/core/unbound_method.rbs +73 -7
- data/core/warning.rbs +37 -12
- data/docs/CONTRIBUTING.md +40 -34
- data/docs/stdlib.md +3 -102
- data/lib/rbs/annotate/annotations.rb +197 -0
- data/lib/rbs/annotate/formatter.rb +80 -0
- data/lib/rbs/annotate/rdoc_annotator.rb +398 -0
- data/lib/rbs/annotate/rdoc_source.rb +120 -0
- data/lib/rbs/annotate.rb +6 -0
- data/lib/rbs/cli.rb +45 -1
- data/lib/rbs/definition_builder.rb +5 -1
- data/lib/rbs/location_aux.rb +12 -0
- data/lib/rbs/prototype/rb.rb +12 -0
- data/lib/rbs/version.rb +1 -1
- data/sig/annotate/annotations.rbs +102 -0
- data/sig/annotate/formatter.rbs +24 -0
- data/sig/annotate/rdoc_annotater.rbs +82 -0
- data/sig/annotate/rdoc_source.rbs +30 -0
- data/sig/cli.rbs +2 -0
- data/sig/collection/{collections.rbs → sources.rbs} +0 -0
- data/sig/location.rbs +6 -0
- data/sig/method_types.rbs +5 -1
- data/sig/polyfill.rbs +78 -0
- data/stdlib/abbrev/0/abbrev.rbs +6 -0
- data/stdlib/abbrev/0/array.rbs +26 -0
- data/stdlib/base64/0/base64.rbs +31 -0
- data/stdlib/benchmark/0/benchmark.rbs +74 -3
- data/stdlib/bigdecimal/0/big_decimal.rbs +614 -165
- data/stdlib/bigdecimal-math/0/big_math.rbs +41 -64
- data/stdlib/cgi/0/core.rbs +59 -0
- data/stdlib/coverage/0/coverage.rbs +164 -2
- data/stdlib/csv/0/csv.rbs +2862 -398
- data/stdlib/date/0/date.rbs +483 -25
- data/stdlib/date/0/date_time.rbs +187 -12
- data/stdlib/dbm/0/dbm.rbs +152 -17
- data/stdlib/digest/0/digest.rbs +146 -0
- data/stdlib/erb/0/erb.rbs +65 -245
- data/stdlib/fiber/0/fiber.rbs +73 -91
- data/stdlib/fileutils/0/fileutils.rbs +301 -1
- data/stdlib/find/0/find.rbs +9 -0
- data/stdlib/forwardable/0/forwardable.rbs +65 -1
- data/stdlib/io-console/0/io-console.rbs +227 -15
- data/stdlib/ipaddr/0/ipaddr.rbs +161 -0
- data/stdlib/json/0/json.rbs +1146 -144
- data/stdlib/logger/0/formatter.rbs +24 -0
- data/stdlib/logger/0/log_device.rbs +64 -0
- data/stdlib/logger/0/logger.rbs +165 -13
- data/stdlib/logger/0/period.rbs +10 -0
- data/stdlib/logger/0/severity.rbs +26 -0
- data/stdlib/monitor/0/monitor.rbs +163 -0
- data/stdlib/mutex_m/0/mutex_m.rbs +35 -6
- data/stdlib/net-http/0/net-http.rbs +1492 -683
- data/stdlib/nkf/0/nkf.rbs +372 -0
- data/stdlib/objspace/0/objspace.rbs +149 -90
- data/stdlib/openssl/0/openssl.rbs +8108 -71
- data/stdlib/optparse/0/optparse.rbs +487 -19
- data/stdlib/pathname/0/pathname.rbs +425 -124
- data/stdlib/prettyprint/0/prettyprint.rbs +120 -99
- data/stdlib/prime/0/integer-extension.rbs +20 -2
- data/stdlib/prime/0/prime.rbs +88 -21
- data/stdlib/pstore/0/pstore.rbs +102 -0
- data/stdlib/pty/0/pty.rbs +64 -14
- data/stdlib/resolv/0/resolv.rbs +420 -31
- data/stdlib/rubygems/0/basic_specification.rbs +4 -1
- data/stdlib/rubygems/0/config_file.rbs +33 -1
- data/stdlib/rubygems/0/dependency_installer.rbs +4 -3
- data/stdlib/rubygems/0/installer.rbs +13 -1
- data/stdlib/rubygems/0/path_support.rbs +4 -1
- data/stdlib/rubygems/0/platform.rbs +5 -1
- data/stdlib/rubygems/0/request_set.rbs +44 -2
- data/stdlib/rubygems/0/requirement.rbs +65 -2
- data/stdlib/rubygems/0/rubygems.rbs +407 -0
- data/stdlib/rubygems/0/source_list.rbs +13 -0
- data/stdlib/rubygems/0/specification.rbs +21 -1
- data/stdlib/rubygems/0/stream_ui.rbs +3 -1
- data/stdlib/rubygems/0/uninstaller.rbs +8 -1
- data/stdlib/rubygems/0/version.rbs +60 -157
- data/stdlib/securerandom/0/securerandom.rbs +44 -0
- data/stdlib/set/0/set.rbs +420 -106
- data/stdlib/shellwords/0/shellwords.rbs +55 -77
- data/stdlib/singleton/0/singleton.rbs +20 -0
- data/stdlib/socket/0/addrinfo.rbs +210 -9
- data/stdlib/socket/0/basic_socket.rbs +103 -11
- data/stdlib/socket/0/ip_socket.rbs +31 -9
- data/stdlib/socket/0/socket.rbs +586 -38
- data/stdlib/socket/0/tcp_server.rbs +22 -2
- data/stdlib/socket/0/tcp_socket.rbs +12 -1
- data/stdlib/socket/0/udp_socket.rbs +25 -2
- data/stdlib/socket/0/unix_server.rbs +22 -2
- data/stdlib/socket/0/unix_socket.rbs +45 -5
- data/stdlib/strscan/0/string_scanner.rbs +210 -9
- data/stdlib/tempfile/0/tempfile.rbs +58 -10
- data/stdlib/time/0/time.rbs +208 -116
- data/stdlib/timeout/0/timeout.rbs +10 -0
- data/stdlib/tmpdir/0/tmpdir.rbs +13 -4
- data/stdlib/tsort/0/cyclic.rbs +1 -0
- data/stdlib/tsort/0/interfaces.rbs +1 -0
- data/stdlib/tsort/0/tsort.rbs +42 -0
- data/stdlib/uri/0/common.rbs +57 -8
- data/stdlib/uri/0/file.rbs +55 -109
- data/stdlib/uri/0/ftp.rbs +6 -3
- data/stdlib/uri/0/generic.rbs +556 -327
- data/stdlib/uri/0/http.rbs +26 -115
- data/stdlib/uri/0/https.rbs +8 -102
- data/stdlib/uri/0/ldap.rbs +143 -137
- data/stdlib/uri/0/ldaps.rbs +8 -102
- data/stdlib/uri/0/mailto.rbs +3 -0
- data/stdlib/uri/0/rfc2396_parser.rbs +66 -26
- data/stdlib/uri/0/ws.rbs +6 -3
- data/stdlib/uri/0/wss.rbs +5 -3
- data/stdlib/yaml/0/dbm.rbs +151 -87
- data/stdlib/yaml/0/store.rbs +6 -0
- data/stdlib/zlib/0/zlib.rbs +90 -31
- metadata +17 -5
- data/lib/rbs/location.rb +0 -221
data/core/file_test.rbs
CHANGED
@@ -1,59 +1,314 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# inclusion: the interpreter cheats).
|
1
|
+
# <!-- rdoc-file=file.c -->
|
2
|
+
# FileTest implements file test operations similar to those used in File::Stat.
|
3
|
+
# It exists as a standalone module, and its methods are also insinuated into the
|
4
|
+
# File class. (Note that this is not done by inclusion: the interpreter cheats).
|
5
|
+
#
|
5
6
|
module FileTest
|
6
|
-
|
7
|
+
# <!--
|
8
|
+
# rdoc-file=file.c
|
9
|
+
# - File.blockdev?(file_name) -> true or false
|
10
|
+
# -->
|
11
|
+
# Returns `true` if the named file is a block device.
|
12
|
+
#
|
13
|
+
# *file_name* can be an IO object.
|
14
|
+
#
|
15
|
+
def self?.blockdev?: (String | IO file_name) -> bool
|
7
16
|
|
8
|
-
|
17
|
+
# <!--
|
18
|
+
# rdoc-file=file.c
|
19
|
+
# - File.chardev?(file_name) -> true or false
|
20
|
+
# -->
|
21
|
+
# Returns `true` if the named file is a character device.
|
22
|
+
#
|
23
|
+
# *file_name* can be an IO object.
|
24
|
+
#
|
25
|
+
def self?.chardev?: (String | IO file_name) -> bool
|
9
26
|
|
10
|
-
|
27
|
+
# <!--
|
28
|
+
# rdoc-file=file.c
|
29
|
+
# - File.directory?(file_name) -> true or false
|
30
|
+
# -->
|
31
|
+
# Returns `true` if the named file is a directory, or a symlink that points at a
|
32
|
+
# directory, and `false` otherwise.
|
33
|
+
#
|
34
|
+
# *file_name* can be an IO object.
|
35
|
+
#
|
36
|
+
# File.directory?(".")
|
37
|
+
#
|
38
|
+
def self?.directory?: (String | IO file_name) -> bool
|
11
39
|
|
12
|
-
|
40
|
+
# <!-- rdoc-file=file.c -->
|
41
|
+
# Returns `true` if the named file exists and has a zero size.
|
42
|
+
#
|
43
|
+
# *file_name* can be an IO object.
|
44
|
+
#
|
45
|
+
def self?.empty?: (String | IO file_name) -> bool
|
13
46
|
|
14
|
-
|
47
|
+
# <!--
|
48
|
+
# rdoc-file=file.c
|
49
|
+
# - File.executable?(file_name) -> true or false
|
50
|
+
# -->
|
51
|
+
# Returns `true` if the named file is executable by the effective user and group
|
52
|
+
# id of this process. See eaccess(3).
|
53
|
+
#
|
54
|
+
# Windows does not support execute permissions separately from read permissions.
|
55
|
+
# On Windows, a file is only considered executable if it ends in .bat, .cmd,
|
56
|
+
# .com, or .exe.
|
57
|
+
#
|
58
|
+
# Note that some OS-level security features may cause this to return true even
|
59
|
+
# though the file is not executable by the effective user/group.
|
60
|
+
#
|
61
|
+
def self?.executable?: (String file_name) -> bool
|
15
62
|
|
16
|
-
|
63
|
+
# <!--
|
64
|
+
# rdoc-file=file.c
|
65
|
+
# - File.executable_real?(file_name) -> true or false
|
66
|
+
# -->
|
67
|
+
# Returns `true` if the named file is executable by the real user and group id
|
68
|
+
# of this process. See access(3).
|
69
|
+
#
|
70
|
+
# Windows does not support execute permissions separately from read permissions.
|
71
|
+
# On Windows, a file is only considered executable if it ends in .bat, .cmd,
|
72
|
+
# .com, or .exe.
|
73
|
+
#
|
74
|
+
# Note that some OS-level security features may cause this to return true even
|
75
|
+
# though the file is not executable by the real user/group.
|
76
|
+
#
|
77
|
+
def self?.executable_real?: (String file_name) -> bool
|
17
78
|
|
18
|
-
|
79
|
+
# <!--
|
80
|
+
# rdoc-file=file.c
|
81
|
+
# - File.exist?(file_name) -> true or false
|
82
|
+
# -->
|
83
|
+
# Return `true` if the named file exists.
|
84
|
+
#
|
85
|
+
# *file_name* can be an IO object.
|
86
|
+
#
|
87
|
+
# "file exists" means that stat() or fstat() system call is successful.
|
88
|
+
#
|
89
|
+
def self?.exist?: (String | IO file_name) -> bool
|
19
90
|
|
20
|
-
|
91
|
+
# <!--
|
92
|
+
# rdoc-file=file.c
|
93
|
+
# - File.file?(file) -> true or false
|
94
|
+
# -->
|
95
|
+
# Returns `true` if the named `file` exists and is a regular file.
|
96
|
+
#
|
97
|
+
# `file` can be an IO object.
|
98
|
+
#
|
99
|
+
# If the `file` argument is a symbolic link, it will resolve the symbolic link
|
100
|
+
# and use the file referenced by the link.
|
101
|
+
#
|
102
|
+
def self?.file?: (String | IO file) -> bool
|
21
103
|
|
22
|
-
|
104
|
+
# <!--
|
105
|
+
# rdoc-file=file.c
|
106
|
+
# - File.grpowned?(file_name) -> true or false
|
107
|
+
# -->
|
108
|
+
# Returns `true` if the named file exists and the effective group id of the
|
109
|
+
# calling process is the owner of the file. Returns `false` on Windows.
|
110
|
+
#
|
111
|
+
# *file_name* can be an IO object.
|
112
|
+
#
|
113
|
+
def self?.grpowned?: (String | IO file_name) -> bool
|
23
114
|
|
24
|
-
|
115
|
+
# <!--
|
116
|
+
# rdoc-file=file.c
|
117
|
+
# - File.identical?(file_1, file_2) -> true or false
|
118
|
+
# -->
|
119
|
+
# Returns `true` if the named files are identical.
|
120
|
+
#
|
121
|
+
# *file_1* and *file_2* can be an IO object.
|
122
|
+
#
|
123
|
+
# open("a", "w") {}
|
124
|
+
# p File.identical?("a", "a") #=> true
|
125
|
+
# p File.identical?("a", "./a") #=> true
|
126
|
+
# File.link("a", "b")
|
127
|
+
# p File.identical?("a", "b") #=> true
|
128
|
+
# File.symlink("a", "c")
|
129
|
+
# p File.identical?("a", "c") #=> true
|
130
|
+
# open("d", "w") {}
|
131
|
+
# p File.identical?("a", "d") #=> false
|
132
|
+
#
|
133
|
+
def self?.identical?: (String | IO file_1, String | IO file_2) -> bool
|
25
134
|
|
26
|
-
|
135
|
+
# <!--
|
136
|
+
# rdoc-file=file.c
|
137
|
+
# - File.owned?(file_name) -> true or false
|
138
|
+
# -->
|
139
|
+
# Returns `true` if the named file exists and the effective used id of the
|
140
|
+
# calling process is the owner of the file.
|
141
|
+
#
|
142
|
+
# *file_name* can be an IO object.
|
143
|
+
#
|
144
|
+
def self?.owned?: (String | IO file_name) -> bool
|
27
145
|
|
28
|
-
|
146
|
+
# <!--
|
147
|
+
# rdoc-file=file.c
|
148
|
+
# - File.pipe?(file_name) -> true or false
|
149
|
+
# -->
|
150
|
+
# Returns `true` if the named file is a pipe.
|
151
|
+
#
|
152
|
+
# *file_name* can be an IO object.
|
153
|
+
#
|
154
|
+
def self?.pipe?: (String | IO file_name) -> bool
|
29
155
|
|
30
|
-
|
156
|
+
# <!--
|
157
|
+
# rdoc-file=file.c
|
158
|
+
# - File.readable?(file_name) -> true or false
|
159
|
+
# -->
|
160
|
+
# Returns `true` if the named file is readable by the effective user and group
|
161
|
+
# id of this process. See eaccess(3).
|
162
|
+
#
|
163
|
+
# Note that some OS-level security features may cause this to return true even
|
164
|
+
# though the file is not readable by the effective user/group.
|
165
|
+
#
|
166
|
+
def self?.readable?: (String file_name) -> bool
|
31
167
|
|
32
|
-
|
168
|
+
# <!--
|
169
|
+
# rdoc-file=file.c
|
170
|
+
# - File.readable_real?(file_name) -> true or false
|
171
|
+
# -->
|
172
|
+
# Returns `true` if the named file is readable by the real user and group id of
|
173
|
+
# this process. See access(3).
|
174
|
+
#
|
175
|
+
# Note that some OS-level security features may cause this to return true even
|
176
|
+
# though the file is not readable by the real user/group.
|
177
|
+
#
|
178
|
+
def self?.readable_real?: (String file_name) -> bool
|
33
179
|
|
34
|
-
|
180
|
+
# <!--
|
181
|
+
# rdoc-file=file.c
|
182
|
+
# - File.setgid?(file_name) -> true or false
|
183
|
+
# -->
|
184
|
+
# Returns `true` if the named file has the setgid bit set.
|
185
|
+
#
|
186
|
+
# *file_name* can be an IO object.
|
187
|
+
#
|
188
|
+
def self?.setgid?: (String | IO file_name) -> bool
|
35
189
|
|
36
|
-
|
190
|
+
# <!--
|
191
|
+
# rdoc-file=file.c
|
192
|
+
# - File.setuid?(file_name) -> true or false
|
193
|
+
# -->
|
194
|
+
# Returns `true` if the named file has the setuid bit set.
|
195
|
+
#
|
196
|
+
# *file_name* can be an IO object.
|
197
|
+
#
|
198
|
+
def self?.setuid?: (String | IO file_name) -> bool
|
37
199
|
|
38
|
-
|
200
|
+
# <!--
|
201
|
+
# rdoc-file=file.c
|
202
|
+
# - File.size(file_name) -> integer
|
203
|
+
# -->
|
204
|
+
# Returns the size of `file_name`.
|
205
|
+
#
|
206
|
+
# *file_name* can be an IO object.
|
207
|
+
#
|
208
|
+
def self?.size: (String | IO file_name) -> Integer
|
39
209
|
|
40
|
-
|
210
|
+
# <!--
|
211
|
+
# rdoc-file=file.c
|
212
|
+
# - File.size?(file_name) -> Integer or nil
|
213
|
+
# -->
|
214
|
+
# Returns `nil` if `file_name` doesn't exist or has zero size, the size of the
|
215
|
+
# file otherwise.
|
216
|
+
#
|
217
|
+
# *file_name* can be an IO object.
|
218
|
+
#
|
219
|
+
def self?.size?: (String | IO file_name) -> Integer?
|
41
220
|
|
42
|
-
|
221
|
+
# <!--
|
222
|
+
# rdoc-file=file.c
|
223
|
+
# - File.socket?(file_name) -> true or false
|
224
|
+
# -->
|
225
|
+
# Returns `true` if the named file is a socket.
|
226
|
+
#
|
227
|
+
# *file_name* can be an IO object.
|
228
|
+
#
|
229
|
+
def self?.socket?: (String | IO file_name) -> bool
|
43
230
|
|
44
|
-
|
231
|
+
# <!--
|
232
|
+
# rdoc-file=file.c
|
233
|
+
# - File.sticky?(file_name) -> true or false
|
234
|
+
# -->
|
235
|
+
# Returns `true` if the named file has the sticky bit set.
|
236
|
+
#
|
237
|
+
# *file_name* can be an IO object.
|
238
|
+
#
|
239
|
+
def self?.sticky?: (String | IO file_name) -> bool
|
45
240
|
|
46
|
-
|
241
|
+
# <!--
|
242
|
+
# rdoc-file=file.c
|
243
|
+
# - File.symlink?(file_name) -> true or false
|
244
|
+
# -->
|
245
|
+
# Returns `true` if the named file is a symbolic link.
|
246
|
+
#
|
247
|
+
def self?.symlink?: (String file_name) -> bool
|
47
248
|
|
48
|
-
|
249
|
+
# <!--
|
250
|
+
# rdoc-file=file.c
|
251
|
+
# - File.world_readable?(file_name) -> integer or nil
|
252
|
+
# -->
|
253
|
+
# If *file_name* is readable by others, returns an integer representing the file
|
254
|
+
# permission bits of *file_name*. Returns `nil` otherwise. The meaning of the
|
255
|
+
# bits is platform dependent; on Unix systems, see `stat(2)`.
|
256
|
+
#
|
257
|
+
# *file_name* can be an IO object.
|
258
|
+
#
|
259
|
+
# File.world_readable?("/etc/passwd") #=> 420
|
260
|
+
# m = File.world_readable?("/etc/passwd")
|
261
|
+
# sprintf("%o", m) #=> "644"
|
262
|
+
#
|
263
|
+
def self?.world_readable?: (String | IO file_name) -> Integer?
|
49
264
|
|
50
|
-
|
265
|
+
# <!--
|
266
|
+
# rdoc-file=file.c
|
267
|
+
# - File.world_writable?(file_name) -> integer or nil
|
268
|
+
# -->
|
269
|
+
# If *file_name* is writable by others, returns an integer representing the file
|
270
|
+
# permission bits of *file_name*. Returns `nil` otherwise. The meaning of the
|
271
|
+
# bits is platform dependent; on Unix systems, see `stat(2)`.
|
272
|
+
#
|
273
|
+
# *file_name* can be an IO object.
|
274
|
+
#
|
275
|
+
# File.world_writable?("/tmp") #=> 511
|
276
|
+
# m = File.world_writable?("/tmp")
|
277
|
+
# sprintf("%o", m) #=> "777"
|
278
|
+
#
|
279
|
+
def self?.world_writable?: (String | IO file_name) -> Integer?
|
51
280
|
|
52
|
-
|
281
|
+
# <!--
|
282
|
+
# rdoc-file=file.c
|
283
|
+
# - File.writable?(file_name) -> true or false
|
284
|
+
# -->
|
285
|
+
# Returns `true` if the named file is writable by the effective user and group
|
286
|
+
# id of this process. See eaccess(3).
|
287
|
+
#
|
288
|
+
# Note that some OS-level security features may cause this to return true even
|
289
|
+
# though the file is not writable by the effective user/group.
|
290
|
+
#
|
291
|
+
def self?.writable?: (String file_name) -> bool
|
53
292
|
|
54
|
-
|
293
|
+
# <!--
|
294
|
+
# rdoc-file=file.c
|
295
|
+
# - File.writable_real?(file_name) -> true or false
|
296
|
+
# -->
|
297
|
+
# Returns `true` if the named file is writable by the real user and group id of
|
298
|
+
# this process. See access(3).
|
299
|
+
#
|
300
|
+
# Note that some OS-level security features may cause this to return true even
|
301
|
+
# though the file is not writable by the real user/group.
|
302
|
+
#
|
303
|
+
def self?.writable_real?: (String file_name) -> bool
|
55
304
|
|
56
|
-
|
57
|
-
|
58
|
-
|
305
|
+
# <!--
|
306
|
+
# rdoc-file=file.c
|
307
|
+
# - File.zero?(file_name) -> true or false
|
308
|
+
# -->
|
309
|
+
# Returns `true` if the named file exists and has a zero size.
|
310
|
+
#
|
311
|
+
# *file_name* can be an IO object.
|
312
|
+
#
|
313
|
+
def self?.zero?: (String | IO file_name) -> bool
|
59
314
|
end
|