Trait koto_runtime::prelude::KotoFile

source ·
pub trait KotoFile: KotoRead + KotoWrite + KotoSend + KotoSync {
    // Required method
    fn id(&self) -> KString;

    // Provided methods
    fn path(&self) -> Result<KString> { ... }
    fn seek(&self, _position: u64) -> Result<()> { ... }
}
Expand description

A trait used for file-like-things in Koto

Required Methods§

source

fn id(&self) -> KString

An identifier for the file, accessed when displaying the file in strings

Provided Methods§

source

fn path(&self) -> Result<KString>

Returns the path of the file

source

fn seek(&self, _position: u64) -> Result<()>

Seeks to the provided position in the file

Implementors§