Trait deno_cache_dir::DenoCacheEnv

source ·
pub trait DenoCacheEnv:
    Send
    + Sync
    + Debug
    + Clone {
    // Required methods
    fn read_file_bytes(&self, path: &Path) -> Result<Vec<u8>>;
    fn atomic_write_file(&self, path: &Path, bytes: &[u8]) -> Result<()>;
    fn modified(&self, path: &Path) -> Result<Option<SystemTime>>;
    fn is_file(&self, path: &Path) -> bool;
    fn time_now(&self) -> SystemTime;
}

Required Methods§

source

fn read_file_bytes(&self, path: &Path) -> Result<Vec<u8>>

source

fn atomic_write_file(&self, path: &Path, bytes: &[u8]) -> Result<()>

source

fn modified(&self, path: &Path) -> Result<Option<SystemTime>>

source

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

source

fn time_now(&self) -> SystemTime

Object Safety§

This trait is not object safe.

Implementors§