Skip to main content

Files

Trait Files 

Source
pub trait Files {
    // Required methods
    fn read(&mut self, path: &str) -> GeopResult<String>;
    fn programs_beside(
        &mut self,
        path: &str,
    ) -> BTreeMap<String, Option<String>>;
    fn write(&mut self, path: &str, bytes: &[u8]) -> GeopResult<()>;
    fn today(&self) -> String;
}
Expand description

The files of the front end a session runs in, which the tools that take a path read and write (AgentTool::files).

Required Methods§

Source

fn read(&mut self, path: &str) -> GeopResult<String>

The text of the file path.

Source

fn programs_beside(&mut self, path: &str) -> BTreeMap<String, Option<String>>

The program files in the folder of path — path among them — by path, with their text: the files the program at path places parts from.

Source

fn write(&mut self, path: &str, bytes: &[u8]) -> GeopResult<()>

Writes bytes to the file path.

Source

fn today(&self) -> String

Today, YYYY-MM-DD: what an export is dated.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§