hermes_runtime_components/traits/fs/
file_path.rs

1use alloc::string::String;
2
3use cgp::prelude::*;
4
5#[derive_component(FilePathTypeComponent, ProvideFilePathType<Runtime>)]
6pub trait HasFilePathType: Async {
7    type FilePath: Async;
8
9    fn file_path_from_string(path: &str) -> Self::FilePath;
10
11    fn file_path_to_string(path: &Self::FilePath) -> String;
12
13    fn join_file_path(path1: &Self::FilePath, path2: &Self::FilePath) -> Self::FilePath;
14}
15
16pub type FilePathOf<Runtime> = <Runtime as HasFilePathType>::FilePath;