EgretDoc
Back to Home
Location:system/aio.fs

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
Signatureextern 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
Signatureextern 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
Signatureextern 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
Signatureextern 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
Signatureextern 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
Signatureextern 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
Signatureextern 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
Signatureextern 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
Signatureextern 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
Signatureextern 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
Signatureextern 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
Signatureextern 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
Signatureextern 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
Signatureextern 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
Signatureextern 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
Signatureextern 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
Signatureextern 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
Signatureextern 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
Signatureextern 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
Signatureextern 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
Signatureextern 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
Signatureextern 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
Signatureextern 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
Signatureextern 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
Signatureextern 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
Signatureextern 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
Signatureextern 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
Signatureextern 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
Signatureextern 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
Signatureextern 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
Signatureextern 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
Signaturefunc 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
Signaturefunc 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
Signaturefunc 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
Signaturefunc 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
Signaturefunc 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
Signaturefunc 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
Signaturefunc 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
Signaturefunc 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
Signaturefunc 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
Signaturefunc 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
Signaturefunc 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
Signaturefunc 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
Signaturefunc 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
Signaturefunc 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
Signaturefunc 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
Signaturefunc 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
Signaturefunc 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
Signaturefunc 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
Signaturefunc 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
Signaturefunc 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
Signaturefunc 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
Signaturefunc 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
Signaturefunc 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
Signaturefunc 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
Signaturefunc 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
Signaturefunc 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
Signaturefunc cancel_all() -> Int
func 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
Signaturefunc cancel_handle(h: Int) -> Int
func 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
Signaturefunc cancel_future_int(f: Future(Int, ErrCode)) -> Int
func 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
Signaturefunc cancel_future_string(f: Future(String, ErrCode)) -> Int
func 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
Signaturefunc cancel_future_bytes(f: Future(bytes.Bytes, ErrCode)) -> Int
func 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
Signaturefunc queue_len() -> Int
func 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
Signaturefunc active_count() -> Int
func 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
Signaturefunc max_queue() -> Int
func 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
Signaturefunc shutdown() -> Void
func 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
Signaturefunc close(h: Int) -> Void
func 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
Signaturefunc file_from_handle(h: Int) -> aio.fs.File
func 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
Signaturefunc file_close(f: aio.fs.File) -> ErrCode
func 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
Signaturefunc stream_from_handle(h: Int, chunk_size: Int, owns_handle: Bool = false) -> aio.fs.Stream
func 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
Signaturefunc stream_close(s: aio.fs.Stream) -> Void
func 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
TypeInt
@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
TypeInt
@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
TypeInt
@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
TypeBool
@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
TypeBool
@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
TypeInt
@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
TypeInt
@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
TypeBool
@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
TypeBool
@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;

    /*