Dir::open_file can just pass read/write as bools, centralizing FileCaps decoding

this way the impls of File/Dir don't need to know about any caps!
This commit is contained in:
Pat Hickey
2021-01-29 21:04:34 -08:00
parent e1ca5d171c
commit 3d406ff50e
3 changed files with 14 additions and 12 deletions

View File

@@ -13,7 +13,8 @@ pub trait WasiDir {
symlink_follow: bool,
path: &str,
oflags: OFlags,
caps: FileCaps,
read: bool,
write: bool,
fdflags: FdFlags,
) -> Result<Box<dyn WasiFile>, Error>;
fn open_dir(&self, symlink_follow: bool, path: &str) -> Result<Box<dyn WasiDir>, Error>;