Closes the system fd or handle.
Opens a file at path.
Opens an unidirectional pipe.
Reads at least one byte from the file descriptor into slice.
Hook to react on the file descriptor after it has been reopened.
Internal shutdown of the file descriptor.
Blocks the current fiber until the file descriptor is ready for read.
Blocks the current fiber until the file descriptor is ready for write.
Writes at least one byte from slice to the file descriptor.
Closes the system fd or handle.
Opens a file at path.
Blocks the current fiber until the file has been opened. Avoids blocking the current thread if possible, especially when blocking is false or nil.
Returns the system file descriptor or handle, or a system error.
Opens an unidirectional pipe.
The implementation shall respect the specified blocking arguments for each end of the pipe, and follow its internal blocking requirements when a blocking arg is nil.
Returns a tuple with the reader and writer IO objects.
Reads at least one byte from the file descriptor into slice.
Blocks the current fiber if no data is available for reading, continuing when available. Otherwise returns immediately.
Returns the number of bytes read (up to slice.size). Returns 0 when EOF is reached.
Hook to react on the file descriptor after it has been reopened. For example we might want to resume all pending operations to act on the new file descriptor.
Internal shutdown of the file descriptor. Called after the IO::FileDescriptor has been marked closed but before calling #close to actually close the system fd or handle.
Implementations shall resume all pending waiters and let them fail because the IO has been closed.
Blocks the current fiber until the file descriptor is ready for read.
Blocks the current fiber until the file descriptor is ready for write.
Writes at least one byte from slice to the file descriptor.
Blocks the current fiber if the file descriptor isn't ready for writing, continuing when ready. Otherwise returns immediately.
Returns the number of bytes written (up to slice.size).
© 2012–2026 Manas Technology Solutions.
Licensed under the Apache License, Version 2.0.
https://crystal-lang.org/api/1.19.0/Crystal/EventLoop/FileDescriptor.html