Defaults: { flags: 'r', encoding: null, fd: null, mode: 0666, autoClose: true }

Fields

@:optionaloptionalstart:Null<Int>

Start of the range of bytes to read

@:optionaloptionalmode:Null<FsMode>

default: 0666

@:optionaloptionalflags:Null<FsOpenFlag>

default: 'r'

@:optionaloptionalfd:Null<Int>

default: null

@:optionaloptionalend:Null<Int>

End of the range of bytes to read

@:optionaloptionalencoding:Null<String>

can be 'utf8', 'ascii', or 'base64'. default: null

@:optionaloptionalautoClose:Null<Bool>

If autoClose is false, then the file descriptor won't be closed, even if there's an error. It is your responsiblity to close it and make sure there's no file descriptor leak.

If autoClose is set to true (default behavior), on error or end the file descriptor will be closed automatically.