Trait deno_fs::FsPermissions

source ·
pub trait FsPermissions {
    // Required methods
    fn check_open<'a>(
        &mut self,
        resolved: bool,
        read: bool,
        write: bool,
        path: &'a Path,
        api_name: &str,
    ) -> Result<Cow<'a, Path>, FsError>;
    fn check_read(
        &mut self,
        path: &Path,
        api_name: &str,
    ) -> Result<(), AnyError>;
    fn check_read_all(&mut self, api_name: &str) -> Result<(), AnyError>;
    fn check_read_blind(
        &mut self,
        p: &Path,
        display: &str,
        api_name: &str,
    ) -> Result<(), AnyError>;
    fn check_write(
        &mut self,
        path: &Path,
        api_name: &str,
    ) -> Result<(), AnyError>;
    fn check_write_partial(
        &mut self,
        path: &Path,
        api_name: &str,
    ) -> Result<(), AnyError>;
    fn check_write_all(&mut self, api_name: &str) -> Result<(), AnyError>;
    fn check_write_blind(
        &mut self,
        p: &Path,
        display: &str,
        api_name: &str,
    ) -> Result<(), AnyError>;

    // Provided method
    fn check<'a>(
        &mut self,
        resolved: bool,
        open_options: &OpenOptions,
        path: &'a Path,
        api_name: &str,
    ) -> Result<Cow<'a, Path>, FsError> { ... }
}

Required Methods§

source

fn check_open<'a>( &mut self, resolved: bool, read: bool, write: bool, path: &'a Path, api_name: &str, ) -> Result<Cow<'a, Path>, FsError>

source

fn check_read(&mut self, path: &Path, api_name: &str) -> Result<(), AnyError>

source

fn check_read_all(&mut self, api_name: &str) -> Result<(), AnyError>

source

fn check_read_blind( &mut self, p: &Path, display: &str, api_name: &str, ) -> Result<(), AnyError>

source

fn check_write(&mut self, path: &Path, api_name: &str) -> Result<(), AnyError>

source

fn check_write_partial( &mut self, path: &Path, api_name: &str, ) -> Result<(), AnyError>

source

fn check_write_all(&mut self, api_name: &str) -> Result<(), AnyError>

source

fn check_write_blind( &mut self, p: &Path, display: &str, api_name: &str, ) -> Result<(), AnyError>

Provided Methods§

source

fn check<'a>( &mut self, resolved: bool, open_options: &OpenOptions, path: &'a Path, api_name: &str, ) -> Result<Cow<'a, Path>, FsError>

Implementations on Foreign Types§

source§

impl FsPermissions for PermissionsContainer

source§

fn check_open<'a>( &mut self, resolved: bool, read: bool, write: bool, path: &'a Path, api_name: &str, ) -> Result<Cow<'a, Path>, FsError>

source§

fn check_read(&mut self, path: &Path, api_name: &str) -> Result<(), AnyError>

source§

fn check_read_blind( &mut self, path: &Path, display: &str, api_name: &str, ) -> Result<(), AnyError>

source§

fn check_write(&mut self, path: &Path, api_name: &str) -> Result<(), AnyError>

source§

fn check_write_partial( &mut self, path: &Path, api_name: &str, ) -> Result<(), AnyError>

source§

fn check_write_blind( &mut self, p: &Path, display: &str, api_name: &str, ) -> Result<(), AnyError>

source§

fn check_read_all(&mut self, api_name: &str) -> Result<(), AnyError>

source§

fn check_write_all(&mut self, api_name: &str) -> Result<(), AnyError>

Implementors§