-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Description
There are a number of aspects to WasiDir that are unclear to me. For completeness, I'll paste the full definition here and put questions in comments.
#[wiggle::async_trait]
pub trait WasiDir: Send + Sync {
/// Does path contain segments? Should we follow symlinks? Should we create intermediate dirs?
async fn create_dir(&self, path: &str) -> Result<(), Error>;
/// Does path contain segments? Should we follow symlinks?
async fn symlink(&self, old_path: &str, new_path: &str) -> Result<(), Error>;
/// Does path contain segments? Should we follow symlinks?
async fn remove_dir(&self, path: &str) -> Result<(), Error>;
/// Does path contain segments? Should we follow symlinks?
async fn unlink_file(&self, path: &str) -> Result<(), Error>;
/// Does path contain segments? Should we follow symlinks?
async fn read_link(&self, path: &str) -> Result<PathBuf, Error>;
/// Does path/dest_path contain segments? Should we follow symlinks?
async fn rename(
&self,
path: &str,
dest_dir: &dyn WasiDir,
dest_path: &str,
) -> Result<(), Error>;
/// Does path/target_path contain segments? Should we follow symlinks?
async fn hard_link(
&self,
path: &str,
target_dir: &dyn WasiDir,
target_path: &str,
) -> Result<(), Error>;
/// There does not appear to be any way to set the times on the directory itself. Is this by design?
async fn set_times(
&self,
path: &str,
atime: Option<SystemTimeSpec>,
mtime: Option<SystemTimeSpec>,
follow_symlinks: bool,
) -> Result<(), Error>;
}Metadata
Metadata
Assignees
Labels
No labels