redef fun close
do
var file = _file
if file == null then return
if file.address_is_null then
if last_error != null then return
last_error = new IOError("Cannot close unopened file")
return
end
var i = file.io_close
if i != 0 then
last_error = new IOError("Close failed due to error {sys.errno.strerror}")
end
_file = null
end
lib/core/file.nit:68,2--82,4
# Close this connection if possible, otherwise mark it to be closed later
redef fun close
do
if closed then return
var i = native_buffer_event.input_buffer
var o = native_buffer_event.output_buffer
if i.length > 0 or o.length > 0 then
close_requested = true
else
force_close
end
end
lib/libevent/libevent.nit:163,2--175,4
redef fun close
do
super
_is_writable = false
end
lib/core/file.nit:251,2--255,4
redef fun close do stream_out.close
lib/core/exec.nit:373,2--36