Module
Module documentation.
moduleaio.fs
Classes
Classes and inheritance.
classaio.fs::Stream
@brief`Stream` type.
@details`Stream` encapsulates state and operations exported by the system module. It commonly stores runtime handles, protocol state, buffers, configuration, or collection data. Its methods define the primary behavior for the type. If the type owns external resources, prefer `dispose` or `close` for deterministic release.
class Stream {
/*
@brief `h` field.classaio.fs::File
@brief`File` type.
@details`File` encapsulates state and operations exported by the system module. It commonly stores runtime handles, protocol state, buffers, configuration, or collection data. Its methods define the primary behavior for the type. If the type owns external resources, prefer `dispose` or `close` for deterministic release.
class File {
/*
@brief `h` field.Functions
Free functions and class methods.
functionaio.fs::__aio_file_read_text
Signature
extern func __aio_file_read_text(path: String) -> Future(String, ErrCode);extern func __aio_file_read_text(path: String) -> Future(String, ErrCode);
/*
@brief Binds the low-level runtime symbol `__aio_file_write_text`.@briefBinds the low-level runtime symbol `__aio_file_read_text`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- pathFile or directory path.
@returnVoid
functionaio.fs::__aio_file_write_text
Signature
extern func __aio_file_write_text(path: String, data: String) -> Future(Int, ErrCode);extern func __aio_file_write_text(path: String, data: String) -> Future(Int, ErrCode);
/*
@brief Binds the low-level runtime symbol `__aio_file_read_bytes`.@briefBinds the low-level runtime symbol `__aio_file_write_text`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- pathFile or directory path.
- dataInput or output data buffer.
@returnVoid
functionaio.fs::__aio_file_read_bytes
Signature
extern func __aio_file_read_bytes(path: String, max_bytes: Int) -> Future(String, ErrCode);extern func __aio_file_read_bytes(path: String, max_bytes: Int) -> Future(String, ErrCode);
/*
@brief Binds the low-level runtime symbol `__aio_file_read_bytes_timeout`.@briefBinds the low-level runtime symbol `__aio_file_read_bytes`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- pathFile or directory path.
- max_bytesMaximum number of bytes to read or process in this operation.
@returnVoid
functionaio.fs::__aio_file_read_bytes_timeout
Signature
extern func __aio_file_read_bytes_timeout(path: String, max_bytes: Int, timeout_ms: Int) -> Future(String, ErrCode);extern func __aio_file_read_bytes_timeout(path: String, max_bytes: Int, timeout_ms: Int) -> Future(String, ErrCode);
/*
@brief Binds the low-level runtime symbol `__aio_file_write_bytes`.@briefBinds the low-level runtime symbol `__aio_file_read_bytes_timeout`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- pathFile or directory path.
- max_bytesMaximum number of bytes to read or process in this operation.
- timeout_msTimeout in milliseconds; negative values usually select blocking or default timeout behavior.
@returnVoid
functionaio.fs::__aio_file_write_bytes
Signature
extern func __aio_file_write_bytes(path: String, data: String) -> Future(Int, ErrCode);extern func __aio_file_write_bytes(path: String, data: String) -> Future(Int, ErrCode);
/*
@brief Binds the low-level runtime symbol `__aio_file_write_text_timeout`.@briefBinds the low-level runtime symbol `__aio_file_write_bytes`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- pathFile or directory path.
- dataInput or output data buffer.
@returnVoid
functionaio.fs::__aio_file_write_text_timeout
Signature
extern func __aio_file_write_text_timeout(path: String, data: String, timeout_ms: Int) -> Future(Int, ErrCode);extern func __aio_file_write_text_timeout(path: String, data: String, timeout_ms: Int) -> Future(Int, ErrCode);
/*
@brief Binds the low-level runtime symbol `__aio_file_read_at`.@briefBinds the low-level runtime symbol `__aio_file_write_text_timeout`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- pathFile or directory path.
- dataInput or output data buffer.
- timeout_msTimeout in milliseconds; negative values usually select blocking or default timeout behavior.
@returnVoid
functionaio.fs::__aio_file_read_at
Signature
extern func __aio_file_read_at(path: String, offset: Int, max_bytes: Int) -> Future(String, ErrCode);extern func __aio_file_read_at(path: String, offset: Int, max_bytes: Int) -> Future(String, ErrCode);
/*
@brief Binds the low-level runtime symbol `__aio_file_read_at_timeout`.@briefBinds the low-level runtime symbol `__aio_file_read_at`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- pathFile or directory path.
- offsetByte offset measured from the start position.
- max_bytesMaximum number of bytes to read or process in this operation.
@returnVoid
functionaio.fs::__aio_file_read_at_timeout
Signature
extern func __aio_file_read_at_timeout(path: String, offset: Int, max_bytes: Int, timeout_ms: Int) -> Future(String, ErrCode);extern func __aio_file_read_at_timeout(path: String, offset: Int, max_bytes: Int, timeout_ms: Int) -> Future(String, ErrCode);
/*
@brief Binds the low-level runtime symbol `__aio_file_write_at`.@briefBinds the low-level runtime symbol `__aio_file_read_at_timeout`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- pathFile or directory path.
- offsetByte offset measured from the start position.
- max_bytesMaximum number of bytes to read or process in this operation.
- timeout_msTimeout in milliseconds; negative values usually select blocking or default timeout behavior.
@returnVoid
functionaio.fs::__aio_file_write_at
Signature
extern func __aio_file_write_at(path: String, offset: Int, data: String) -> Future(Int, ErrCode);extern func __aio_file_write_at(path: String, offset: Int, data: String) -> Future(Int, ErrCode);
/*
@brief Binds the low-level runtime symbol `__aio_file_write_at_timeout`.@briefBinds the low-level runtime symbol `__aio_file_write_at`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- pathFile or directory path.
- offsetByte offset measured from the start position.
- dataInput or output data buffer.
@returnVoid
functionaio.fs::__aio_file_write_at_timeout
Signature
extern func __aio_file_write_at_timeout(path: String, offset: Int, data: String, timeout_ms: Int) -> Future(Int, ErrCode);extern func __aio_file_write_at_timeout(path: String, offset: Int, data: String, timeout_ms: Int) -> Future(Int, ErrCode);
/*
@brief Binds the low-level runtime symbol `__aio_file_open`.@briefBinds the low-level runtime symbol `__aio_file_write_at_timeout`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- pathFile or directory path.
- offsetByte offset measured from the start position.
- dataInput or output data buffer.
- timeout_msTimeout in milliseconds; negative values usually select blocking or default timeout behavior.
@returnVoid
functionaio.fs::__aio_file_open
Signature
extern func __aio_file_open(path: String, flags: Int, mode: Int) -> Future(Int, ErrCode);extern func __aio_file_open(path: String, flags: Int, mode: Int) -> Future(Int, ErrCode);
/*
@brief Binds the low-level runtime symbol `__aio_file_open_timeout`.@briefBinds the low-level runtime symbol `__aio_file_open`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- pathFile or directory path.
- flagsBitmask of option flags that controls how the operation is performed.
- modeMode value that selects permissions, behavior, or formatting rules for the operation.
@returnVoid
functionaio.fs::__aio_file_open_timeout
Signature
extern func __aio_file_open_timeout(path: String, flags: Int, mode: Int, timeout_ms: Int) -> Future(Int, ErrCode);extern func __aio_file_open_timeout(path: String, flags: Int, mode: Int, timeout_ms: Int) -> Future(Int, ErrCode);
/*
@brief Binds the low-level runtime symbol `__aio_file_handle_read_at`.@briefBinds the low-level runtime symbol `__aio_file_open_timeout`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- pathFile or directory path.
- flagsBitmask of option flags that controls how the operation is performed.
- modeMode value that selects permissions, behavior, or formatting rules for the operation.
- timeout_msTimeout in milliseconds; negative values usually select blocking or default timeout behavior.
@returnVoid
functionaio.fs::__aio_file_handle_read_at
Signature
extern func __aio_file_handle_read_at(h: Int, offset: Int, max_bytes: Int) -> Future(String, ErrCode);extern func __aio_file_handle_read_at(h: Int, offset: Int, max_bytes: Int) -> Future(String, ErrCode);
/*
@brief Binds the low-level runtime symbol `__aio_file_handle_read_at_timeout`.@briefBinds the low-level runtime symbol `__aio_file_handle_read_at`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- hUnderlying runtime handle.
- offsetByte offset measured from the start position.
- max_bytesMaximum number of bytes to read or process in this operation.
@returnVoid
functionaio.fs::__aio_file_handle_read_at_timeout
Signature
extern func __aio_file_handle_read_at_timeout(h: Int, offset: Int, max_bytes: Int, timeout_ms: Int) -> Future(String, ErrCode);extern func __aio_file_handle_read_at_timeout(h: Int, offset: Int, max_bytes: Int, timeout_ms: Int) -> Future(String, ErrCode);
/*
@brief Binds the low-level runtime symbol `__aio_file_handle_write_at`.@briefBinds the low-level runtime symbol `__aio_file_handle_read_at_timeout`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- hUnderlying runtime handle.
- offsetByte offset measured from the start position.
- max_bytesMaximum number of bytes to read or process in this operation.
- timeout_msTimeout in milliseconds; negative values usually select blocking or default timeout behavior.
@returnVoid
functionaio.fs::__aio_file_handle_write_at
Signature
extern func __aio_file_handle_write_at(h: Int, offset: Int, data: String) -> Future(Int, ErrCode);extern func __aio_file_handle_write_at(h: Int, offset: Int, data: String) -> Future(Int, ErrCode);
/*
@brief Binds the low-level runtime symbol `__aio_file_handle_write_at_timeout`.@briefBinds the low-level runtime symbol `__aio_file_handle_write_at`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- hUnderlying runtime handle.
- offsetByte offset measured from the start position.
- dataInput or output data buffer.
@returnVoid
functionaio.fs::__aio_file_handle_write_at_timeout
Signature
extern func __aio_file_handle_write_at_timeout(h: Int, offset: Int, data: String, timeout_ms: Int) -> Future(Int, ErrCode);extern func __aio_file_handle_write_at_timeout(h: Int, offset: Int, data: String, timeout_ms: Int) -> Future(Int, ErrCode);
/*
@brief Binds the low-level runtime symbol `__aio_file_fsync`.@briefBinds the low-level runtime symbol `__aio_file_handle_write_at_timeout`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- hUnderlying runtime handle.
- offsetByte offset measured from the start position.
- dataInput or output data buffer.
- timeout_msTimeout in milliseconds; negative values usually select blocking or default timeout behavior.
@returnVoid
functionaio.fs::__aio_file_fsync
Signature
extern func __aio_file_fsync(h: Int) -> Future(Int, ErrCode);extern func __aio_file_fsync(h: Int) -> Future(Int, ErrCode);
/*
@brief Binds the low-level runtime symbol `__aio_file_rename`.@briefBinds the low-level runtime symbol `__aio_file_fsync`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- hUnderlying runtime handle.
@returnVoid
functionaio.fs::__aio_file_rename
Signature
extern func __aio_file_rename(from: String, to: String) -> Future(Int, ErrCode);extern func __aio_file_rename(from: String, to: String) -> Future(Int, ErrCode);
/*
@brief Binds the low-level runtime symbol `__aio_file_copy`.@briefBinds the low-level runtime symbol `__aio_file_rename`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- fromSource endpoint, path, index, or lower boundary for the operation.
- toDestination endpoint, path, index, or upper boundary for the operation.
@returnVoid
functionaio.fs::__aio_file_copy
Signature
extern func __aio_file_copy(from: String, to: String) -> Future(Int, ErrCode);extern func __aio_file_copy(from: String, to: String) -> Future(Int, ErrCode);
/*
@brief Binds the low-level runtime symbol `__aio_file_stat_size`.@briefBinds the low-level runtime symbol `__aio_file_copy`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- fromSource endpoint, path, index, or lower boundary for the operation.
- toDestination endpoint, path, index, or upper boundary for the operation.
@returnVoid
functionaio.fs::__aio_file_stat_size
Signature
extern func __aio_file_stat_size(path: String) -> Future(Int, ErrCode);extern func __aio_file_stat_size(path: String) -> Future(Int, ErrCode);
/*
@brief Binds the low-level runtime symbol `__aio_file_stat_is_dir`.@briefBinds the low-level runtime symbol `__aio_file_stat_size`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- pathFile or directory path.
@returnVoid
functionaio.fs::__aio_file_stat_is_dir
Signature
extern func __aio_file_stat_is_dir(path: String) -> Future(Int, ErrCode);extern func __aio_file_stat_is_dir(path: String) -> Future(Int, ErrCode);
/*
@brief Binds the low-level runtime symbol `__aio_file_watch_once`.@briefBinds the low-level runtime symbol `__aio_file_stat_is_dir`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- pathFile or directory path.
@returnVoid
functionaio.fs::__aio_file_watch_once
Signature
extern func __aio_file_watch_once(path: String, timeout_ms: Int) -> Future(Int, ErrCode);extern func __aio_file_watch_once(path: String, timeout_ms: Int) -> Future(Int, ErrCode);
/*
@brief Binds the low-level runtime symbol `__aio_file_cancel_all`.@briefBinds the low-level runtime symbol `__aio_file_watch_once`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- pathFile or directory path.
- timeout_msTimeout in milliseconds; negative values usually select blocking or default timeout behavior.
@returnVoid
functionaio.fs::__aio_file_cancel_all
Signature
extern func __aio_file_cancel_all() -> Int;extern func __aio_file_cancel_all() -> Int;
/*
@brief Binds the low-level runtime symbol `__aio_file_cancel_handle`.@briefBinds the low-level runtime symbol `__aio_file_cancel_all`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@returnReturns the operation result as `Int`.
functionaio.fs::__aio_file_cancel_handle
Signature
extern func __aio_file_cancel_handle(h: Int) -> Int;extern func __aio_file_cancel_handle(h: Int) -> Int;
/*
@brief Binds the low-level runtime symbol `__aio_file_cancel_future_int`.@briefBinds the low-level runtime symbol `__aio_file_cancel_handle`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- hUnderlying runtime handle.
@returnReturns the operation result as `Int`.
functionaio.fs::__aio_file_cancel_future_int
Signature
extern func __aio_file_cancel_future_int(f: Future(Int, ErrCode)) -> Int;extern func __aio_file_cancel_future_int(f: Future(Int, ErrCode)) -> Int;
/*
@brief Binds the low-level runtime symbol `__aio_file_cancel_future_string`.@briefBinds the low-level runtime symbol `__aio_file_cancel_future_int`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- fFuture, callback, file handle, or function object that the operation observes or invokes.
@returnReturns the operation result as `Int`.
functionaio.fs::__aio_file_cancel_future_string
Signature
extern func __aio_file_cancel_future_string(f: Future(String, ErrCode)) -> Int;extern func __aio_file_cancel_future_string(f: Future(String, ErrCode)) -> Int;
/*
@brief Binds the low-level runtime symbol `__aio_file_queue_len`.@briefBinds the low-level runtime symbol `__aio_file_cancel_future_string`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- fFuture, callback, file handle, or function object that the operation observes or invokes.
@returnReturns the operation result as `Int`.
functionaio.fs::__aio_file_queue_len
Signature
extern func __aio_file_queue_len() -> Int;extern func __aio_file_queue_len() -> Int;
/*
@brief Binds the low-level runtime symbol `__aio_file_active_count`.@briefBinds the low-level runtime symbol `__aio_file_queue_len`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@returnReturns the operation result as `Int`.
functionaio.fs::__aio_file_active_count
Signature
extern func __aio_file_active_count() -> Int;extern func __aio_file_active_count() -> Int;
/*
@brief Binds the low-level runtime symbol `__aio_file_max_queue`.@briefBinds the low-level runtime symbol `__aio_file_active_count`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@returnReturns the operation result as `Int`.
functionaio.fs::__aio_file_max_queue
Signature
extern func __aio_file_max_queue() -> Int;extern func __aio_file_max_queue() -> Int;
/*
@brief Binds the low-level runtime symbol `__aio_file_shutdown`.@briefBinds the low-level runtime symbol `__aio_file_max_queue`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@returnReturns the operation result as `Int`.
functionaio.fs::__aio_file_shutdown
Signature
extern func __aio_file_shutdown() -> Void;extern func __aio_file_shutdown() -> Void;
/*
@brief Binds the low-level runtime symbol `__aio_file_close`.@briefBinds the low-level runtime symbol `__aio_file_shutdown`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@returnVoid
functionaio.fs::__aio_file_close
Signature
extern func __aio_file_close(h: Int) -> Void;extern func __aio_file_close(h: Int) -> Void;
/*@briefBinds the low-level runtime symbol `__aio_file_close`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- hUnderlying runtime handle.
@returnVoid
functionaio.fs::Stream.init
Signature
func init(self: aio.fs.Stream) -> Void func init(self: aio.fs.Stream) -> Void {
self.h = 0;
self.offset = 0;@briefInitializes a `Stream` instance.
@detailsEstablishes the initial field state for `Stream` so other methods can be called safely. Constructor logic should keep fields consistent and avoid leaking partially initialized resources.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionaio.fs::Stream.deinit
Signature
func deinit(self: aio.fs.Stream) -> Void func deinit(self: aio.fs.Stream) -> Void {
if self.owns_handle && !self.closed && self.h != 0 {
_ = aio.fs.stream_close(self);@briefReleases fallback resources at the end of the `Stream` lifetime.
@detailsThis destructor hook is called by object lifetime management to clean up underlying resources that were not released explicitly. Normal application code should prefer `dispose`, `close`, or the module-specific close function to release resources at a deterministic time.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionaio.fs::File.init
Signature
func init(self: aio.fs.File, h: Int = 0, owns_handle: Bool = false) -> Void func init(self: aio.fs.File, h: Int = 0, owns_handle: Bool = false) -> Void {
self.h = h;
self.offset = 0;@briefInitializes a `File` instance.
@detailsEstablishes the initial field state for `File` so other methods can be called safely. Constructor logic should keep fields consistent and avoid leaking partially initialized resources.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- hUnderlying runtime handle.
- owns_handleWhether the object owns the native handle and must release it during cleanup.
@returnVoid
functionaio.fs::File.deinit
Signature
func deinit(self: aio.fs.File) -> Void func deinit(self: aio.fs.File) -> Void {
if self.owns_handle && !self.closed && self.h != 0 {
_ = aio.fs.file_close(self);@briefReleases fallback resources at the end of the `File` lifetime.
@detailsThis destructor hook is called by object lifetime management to clean up underlying resources that were not released explicitly. Normal application code should prefer `dispose`, `close`, or the module-specific close function to release resources at a deterministic time.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionaio.fs::read_text
Signature
func read_text(path: String) -> Future(String, ErrCode)func read_text(path: String) -> Future(String, ErrCode) {
return __aio_file_read_text(path);
}@briefReads data with `read_text`.
@detailsExecutes the `read_text` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- pathFile or directory path.
@returnVoid
functionaio.fs::write_text
Signature
func write_text(path: String, data: String) -> Future(Int, ErrCode)func write_text(path: String, data: String) -> Future(Int, ErrCode) {
return __aio_file_write_text(path, data);
}@briefWrites data with `write_text`.
@detailsExecutes the `write_text` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- pathFile or directory path.
- dataInput or output data buffer.
@returnVoid
functionaio.fs::read_bytes
Signature
func read_bytes(path: String, max_bytes: Int) -> Future(bytes.Bytes, ErrCode)func read_bytes(path: String, max_bytes: Int) -> Future(bytes.Bytes, ErrCode) {
return __aio_file_read_bytes(path, max_bytes);
}@briefReads data with `read_bytes`.
@detailsExecutes the `read_bytes` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- pathFile or directory path.
- max_bytesMaximum number of bytes to read or process in this operation.
@returnVoid
functionaio.fs::read_bytes_timeout
Signature
func read_bytes_timeout(path: String, max_bytes: Int, timeout_ms: Int) -> Future(bytes.Bytes, ErrCode)func read_bytes_timeout(path: String, max_bytes: Int, timeout_ms: Int) -> Future(bytes.Bytes, ErrCode) {
return __aio_file_read_bytes_timeout(path, max_bytes, timeout_ms);
}@briefReads data with `read_bytes_timeout`.
@detailsExecutes the `read_bytes_timeout` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- pathFile or directory path.
- max_bytesMaximum number of bytes to read or process in this operation.
- timeout_msTimeout in milliseconds; negative values usually select blocking or default timeout behavior.
@returnVoid
functionaio.fs::write_bytes
Signature
func write_bytes(path: String, data: bytes.Bytes) -> Future(Int, ErrCode)func write_bytes(path: String, data: bytes.Bytes) -> Future(Int, ErrCode) {
return __aio_file_write_bytes(path, data);
}@briefWrites data with `write_bytes`.
@detailsExecutes the `write_bytes` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- pathFile or directory path.
- dataInput or output data buffer.
@returnVoid
functionaio.fs::write_text_timeout
Signature
func write_text_timeout(path: String, data: String, timeout_ms: Int) -> Future(Int, ErrCode)func write_text_timeout(path: String, data: String, timeout_ms: Int) -> Future(Int, ErrCode) {
return __aio_file_write_text_timeout(path, data, timeout_ms);
}@briefWrites data with `write_text_timeout`.
@detailsExecutes the `write_text_timeout` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- pathFile or directory path.
- dataInput or output data buffer.
- timeout_msTimeout in milliseconds; negative values usually select blocking or default timeout behavior.
@returnVoid
functionaio.fs::read_path_at
Signature
func read_path_at(path: String, offset: Int, max_bytes: Int) -> Future(String, ErrCode)func read_path_at(path: String, offset: Int, max_bytes: Int) -> Future(String, ErrCode) {
return __aio_file_read_at(path, offset, max_bytes);
}@briefReads data with `read_path_at`.
@detailsExecutes the `read_path_at` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- pathFile or directory path.
- offsetByte offset measured from the start position.
- max_bytesMaximum number of bytes to read or process in this operation.
@returnVoid
functionaio.fs::read_path_at_timeout
Signature
func read_path_at_timeout(path: String, offset: Int, max_bytes: Int, timeout_ms: Int) -> Future(String, ErrCode)func read_path_at_timeout(path: String, offset: Int, max_bytes: Int, timeout_ms: Int) -> Future(String, ErrCode) {
return __aio_file_read_at_timeout(path, offset, max_bytes, timeout_ms);
}@briefReads data with `read_path_at_timeout`.
@detailsExecutes the `read_path_at_timeout` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- pathFile or directory path.
- offsetByte offset measured from the start position.
- max_bytesMaximum number of bytes to read or process in this operation.
- timeout_msTimeout in milliseconds; negative values usually select blocking or default timeout behavior.
@returnVoid
functionaio.fs::write_path_at
Signature
func write_path_at(path: String, offset: Int, data: String) -> Future(Int, ErrCode)func write_path_at(path: String, offset: Int, data: String) -> Future(Int, ErrCode) {
return __aio_file_write_at(path, offset, data);
}@briefWrites data with `write_path_at`.
@detailsExecutes the `write_path_at` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- pathFile or directory path.
- offsetByte offset measured from the start position.
- dataInput or output data buffer.
@returnVoid
functionaio.fs::write_path_at_timeout
Signature
func write_path_at_timeout(path: String, offset: Int, data: String, timeout_ms: Int) -> Future(Int, ErrCode)func write_path_at_timeout(path: String, offset: Int, data: String, timeout_ms: Int) -> Future(Int, ErrCode) {
return __aio_file_write_at_timeout(path, offset, data, timeout_ms);
}@briefWrites data with `write_path_at_timeout`.
@detailsExecutes the `write_path_at_timeout` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- pathFile or directory path.
- offsetByte offset measured from the start position.
- dataInput or output data buffer.
- timeout_msTimeout in milliseconds; negative values usually select blocking or default timeout behavior.
@returnVoid
functionaio.fs::open
Signature
func open(path: String, flags: Int, mode: Int) -> Future(Int, ErrCode)func open(path: String, flags: Int, mode: Int) -> Future(Int, ErrCode) {
return __aio_file_open(path, flags, mode);
}@briefProvides the system library operation `open`.
@detailsExecutes the `open` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- pathFile or directory path.
- flagsBitmask of option flags that controls how the operation is performed.
- modeMode value that selects permissions, behavior, or formatting rules for the operation.
@returnVoid
functionaio.fs::open_timeout
Signature
func open_timeout(path: String, flags: Int, mode: Int, timeout_ms: Int) -> Future(Int, ErrCode)func open_timeout(path: String, flags: Int, mode: Int, timeout_ms: Int) -> Future(Int, ErrCode) {
return __aio_file_open_timeout(path, flags, mode, timeout_ms);
}@briefOpens a resource with `open_timeout`.
@detailsExecutes the `open_timeout` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- pathFile or directory path.
- flagsBitmask of option flags that controls how the operation is performed.
- modeMode value that selects permissions, behavior, or formatting rules for the operation.
- timeout_msTimeout in milliseconds; negative values usually select blocking or default timeout behavior.
@returnVoid
functionaio.fs::read_at
Signature
func read_at(h: Int, offset: Int, max_bytes: Int) -> Future(String, ErrCode)func read_at(h: Int, offset: Int, max_bytes: Int) -> Future(String, ErrCode) {
return __aio_file_handle_read_at(h, offset, max_bytes);
}@briefReads data with `read_at`.
@detailsExecutes the `read_at` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- hUnderlying runtime handle.
- offsetByte offset measured from the start position.
- max_bytesMaximum number of bytes to read or process in this operation.
@returnVoid
functionaio.fs::read_at_timeout
Signature
func read_at_timeout(h: Int, offset: Int, max_bytes: Int, timeout_ms: Int) -> Future(String, ErrCode)func read_at_timeout(h: Int, offset: Int, max_bytes: Int, timeout_ms: Int) -> Future(String, ErrCode) {
return __aio_file_handle_read_at_timeout(h, offset, max_bytes, timeout_ms);
}@briefReads data with `read_at_timeout`.
@detailsExecutes the `read_at_timeout` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- hUnderlying runtime handle.
- offsetByte offset measured from the start position.
- max_bytesMaximum number of bytes to read or process in this operation.
- timeout_msTimeout in milliseconds; negative values usually select blocking or default timeout behavior.
@returnVoid
functionaio.fs::write_at
Signature
func write_at(h: Int, offset: Int, data: String) -> Future(Int, ErrCode)func write_at(h: Int, offset: Int, data: String) -> Future(Int, ErrCode) {
return __aio_file_handle_write_at(h, offset, data);
}@briefWrites data with `write_at`.
@detailsExecutes the `write_at` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- hUnderlying runtime handle.
- offsetByte offset measured from the start position.
- dataInput or output data buffer.
@returnVoid
functionaio.fs::write_at_timeout
Signature
func write_at_timeout(h: Int, offset: Int, data: String, timeout_ms: Int) -> Future(Int, ErrCode)func write_at_timeout(h: Int, offset: Int, data: String, timeout_ms: Int) -> Future(Int, ErrCode) {
return __aio_file_handle_write_at_timeout(h, offset, data, timeout_ms);
}@briefWrites data with `write_at_timeout`.
@detailsExecutes the `write_at_timeout` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- hUnderlying runtime handle.
- offsetByte offset measured from the start position.
- dataInput or output data buffer.
- timeout_msTimeout in milliseconds; negative values usually select blocking or default timeout behavior.
@returnVoid
functionaio.fs::fsync
Signature
func fsync(h: Int) -> Future(Int, ErrCode)func fsync(h: Int) -> Future(Int, ErrCode) {
return __aio_file_fsync(h);
}@briefProvides the system library operation `fsync`.
@detailsExecutes the `fsync` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- hUnderlying runtime handle.
@returnVoid
functionaio.fs::rename
Signature
func rename(from: String, to: String) -> Future(Int, ErrCode)func rename(from: String, to: String) -> Future(Int, ErrCode) {
return __aio_file_rename(from, to);
}@briefProvides the system library operation `rename`.
@detailsExecutes the `rename` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- fromSource endpoint, path, index, or lower boundary for the operation.
- toDestination endpoint, path, index, or upper boundary for the operation.
@returnVoid
functionaio.fs::copy
Signature
func copy(from: String, to: String) -> Future(Int, ErrCode)func copy(from: String, to: String) -> Future(Int, ErrCode) {
return __aio_file_copy(from, to);
}@briefProvides the system library operation `copy`.
@detailsExecutes the `copy` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- fromSource endpoint, path, index, or lower boundary for the operation.
- toDestination endpoint, path, index, or upper boundary for the operation.
@returnVoid
functionaio.fs::stat_size
Signature
func stat_size(path: String) -> Future(Int, ErrCode)func stat_size(path: String) -> Future(Int, ErrCode) {
return __aio_file_stat_size(path);
}@briefProvides the system library operation `stat_size`.
@detailsExecutes the `stat_size` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- pathFile or directory path.
@returnVoid
functionaio.fs::stat_is_dir
Signature
func stat_is_dir(path: String) -> Future(Int, ErrCode)func stat_is_dir(path: String) -> Future(Int, ErrCode) {
return __aio_file_stat_is_dir(path);
}@briefProvides the system library operation `stat_is_dir`.
@detailsExecutes the `stat_is_dir` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- pathFile or directory path.
@returnVoid
functionaio.fs::watch_once
Signature
func watch_once(path: String, timeout_ms: Int) -> Future(Int, ErrCode)func watch_once(path: String, timeout_ms: Int) -> Future(Int, ErrCode) {
return __aio_file_watch_once(path, timeout_ms);
}@briefProvides the system library operation `watch_once`.
@detailsExecutes the `watch_once` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- pathFile or directory path.
- timeout_msTimeout in milliseconds; negative values usually select blocking or default timeout behavior.
@returnVoid
functionaio.fs::cancel_all
Signature
func cancel_all() -> Intfunc cancel_all() -> Int {
return __aio_file_cancel_all();
}@briefProvides the system library operation `cancel_all`.
@detailsExecutes the `cancel_all` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionaio.fs::cancel_handle
Signature
func cancel_handle(h: Int) -> Intfunc cancel_handle(h: Int) -> Int {
return __aio_file_cancel_handle(h);
}@briefProvides the system library operation `cancel_handle`.
@detailsExecutes the `cancel_handle` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- hUnderlying runtime handle.
@returnReturns the operation result as `Int`.
functionaio.fs::cancel_future_int
Signature
func cancel_future_int(f: Future(Int, ErrCode)) -> Intfunc cancel_future_int(f: Future(Int, ErrCode)) -> Int {
return __aio_file_cancel_future_int(f);
}@briefProvides the system library operation `cancel_future_int`.
@detailsExecutes the `cancel_future_int` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- fFuture, callback, file handle, or function object that the operation observes or invokes.
@returnReturns the operation result as `Int`.
functionaio.fs::cancel_future_string
Signature
func cancel_future_string(f: Future(String, ErrCode)) -> Intfunc cancel_future_string(f: Future(String, ErrCode)) -> Int {
return __aio_file_cancel_future_string(f);
}@briefProvides the system library operation `cancel_future_string`.
@detailsExecutes the `cancel_future_string` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- fFuture, callback, file handle, or function object that the operation observes or invokes.
@returnReturns the operation result as `Int`.
functionaio.fs::cancel_future_bytes
Signature
func cancel_future_bytes(f: Future(bytes.Bytes, ErrCode)) -> Intfunc cancel_future_bytes(f: Future(bytes.Bytes, ErrCode)) -> Int {
return __aio_file_cancel_future_string(f);
}@briefProvides the system library operation `cancel_future_bytes`.
@detailsExecutes the `cancel_future_bytes` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- fFuture, callback, file handle, or function object that the operation observes or invokes.
@returnReturns the operation result as `Int`.
functionaio.fs::queue_len
Signature
func queue_len() -> Intfunc queue_len() -> Int {
return __aio_file_queue_len();
}@briefProvides the system library operation `queue_len`.
@detailsExecutes the `queue_len` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionaio.fs::active_count
Signature
func active_count() -> Intfunc active_count() -> Int {
return __aio_file_active_count();
}@briefProvides the system library operation `active_count`.
@detailsExecutes the `active_count` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionaio.fs::max_queue
Signature
func max_queue() -> Intfunc max_queue() -> Int {
return __aio_file_max_queue();
}@briefProvides the system library operation `max_queue`.
@detailsExecutes the `max_queue` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionaio.fs::shutdown
Signature
func shutdown() -> Voidfunc shutdown() -> Void {
_ = __aio_file_shutdown();
return;@briefProvides the system library operation `shutdown`.
@detailsExecutes the `shutdown` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnVoid
functionaio.fs::close
Signature
func close(h: Int) -> Voidfunc close(h: Int) -> Void {
_ = __aio_file_close(h);
return;@briefCloses resources and makes later operations unavailable with `close`.
@detailsExecutes the `close` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- hUnderlying runtime handle.
@returnVoid
functionaio.fs::file_from_handle
Signature
func file_from_handle(h: Int) -> aio.fs.Filefunc file_from_handle(h: Int) -> aio.fs.File {
return new aio.fs.File(h);
}@briefProvides the system library operation `file_from_handle`.
@detailsExecutes the `file_from_handle` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- hUnderlying runtime handle.
@returnReturns the operation result as `aio.fs.File`.
functionaio.fs::file_close
Signature
func file_close(f: aio.fs.File) -> ErrCodefunc file_close(f: aio.fs.File) -> ErrCode {
if !f.closed {
_ = aio.fs.close(f.h);@briefProvides the system library operation `file_close`.
@detailsExecutes the `file_close` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- fFuture, callback, file handle, or function object that the operation observes or invokes.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionaio.fs::stream_from_handle
Signature
func stream_from_handle(h: Int, chunk_size: Int, owns_handle: Bool = false) -> aio.fs.Streamfunc stream_from_handle(h: Int, chunk_size: Int, owns_handle: Bool = false) -> aio.fs.Stream {
let s = new aio.fs.Stream();
s.h = h;@briefProvides the system library operation `stream_from_handle`.
@detailsExecutes the `stream_from_handle` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- hUnderlying runtime handle.
- chunk_sizeSize or length value that limits how much data the operation processes.
- owns_handleWhether the object owns the native handle and must release it during cleanup.
@returnReturns the operation result as `aio.fs.Stream`.
functionaio.fs::stream_close
Signature
func stream_close(s: aio.fs.Stream) -> Voidfunc stream_close(s: aio.fs.Stream) -> Void {
if !s.closed && s.h != 0 {
_ = aio.fs.close(s.h);@briefProvides the system library operation `stream_close`.
@detailsExecutes the `stream_close` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- sInput string.
@returnVoid
Variables
Class fields (var).
varaio.fs::Stream.h
Type
Int@brief`h` field.
@detailsStores the underlying runtime handle. The field type is `Int`, and it is maintained by the constructors and methods of `Stream`.
var h: Int;
/*
@brief `offset` field.varaio.fs::Stream.offset
Type
Int@brief`offset` field.
@detailsStores the current read/write offset. The field type is `Int`, and it is maintained by the constructors and methods of `Stream`.
var offset: Int;
/*
@brief `chunk_size` field.varaio.fs::Stream.chunk_size
Type
Int@brief`chunk_size` field.
@detailsHolds the `chunk_size` value for each `Stream` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var chunk_size: Int;
/*
@brief `closed` field.varaio.fs::Stream.closed
Type
Bool@brief`closed` field.
@detailsIndicates whether the resource has already been closed. The field type is `Bool`, and it is maintained by the constructors and methods of `Stream`.
var closed: Bool;
/*
@brief `owns_handle` field.varaio.fs::Stream.owns_handle
Type
Bool@brief`owns_handle` field.
@detailsIndicates whether the object owns and must release the underlying handle. The field type is `Bool`, and it is maintained by the constructors and methods of `Stream`.
var owns_handle: Bool;
/*varaio.fs::File.h
Type
Int@brief`h` field.
@detailsStores the underlying runtime handle. The field type is `Int`, and it is maintained by the constructors and methods of `File`.
var h: Int;
/*
@brief `offset` field.varaio.fs::File.offset
Type
Int@brief`offset` field.
@detailsStores the current read/write offset. The field type is `Int`, and it is maintained by the constructors and methods of `File`.
var offset: Int;
/*
@brief `chunk_size` field.varaio.fs::File.closed
Type
Bool@brief`closed` field.
@detailsIndicates whether the resource has already been closed. The field type is `Bool`, and it is maintained by the constructors and methods of `File`.
var closed: Bool;
/*
@brief `owns_handle` field.varaio.fs::File.owns_handle
Type
Bool@brief`owns_handle` field.
@detailsIndicates whether the object owns and must release the underlying handle. The field type is `Bool`, and it is maintained by the constructors and methods of `File`.
var owns_handle: Bool;
/*