Trait deno_node::NodeFs

source ·
pub trait NodeFs: Debug + Send + Sync {
    // Required methods
    fn current_dir(&self) -> Result<PathBuf>;
    fn metadata(&self, path: &Path) -> Result<NodeFsMetadata>;
    fn is_file(&self, path: &Path) -> bool;
    fn is_dir(&self, path: &Path) -> bool;
    fn exists(&self, path: &Path) -> bool;
    fn read_to_string(&self, path: &Path) -> Result<String>;
    fn canonicalize(&self, path: &Path) -> Result<PathBuf>;
}

Required Methods§

source

fn current_dir(&self) -> Result<PathBuf>

source

fn metadata(&self, path: &Path) -> Result<NodeFsMetadata>

source

fn is_file(&self, path: &Path) -> bool

source

fn is_dir(&self, path: &Path) -> bool

source

fn exists(&self, path: &Path) -> bool

source

fn read_to_string(&self, path: &Path) -> Result<String>

source

fn canonicalize(&self, path: &Path) -> Result<PathBuf>

Implementors§