make a pipe filetype, reorder filetype enum

This commit is contained in:
Pat Hickey
2021-01-22 11:37:39 -08:00
parent 86d369c72a
commit a06c4fbe1a
4 changed files with 9 additions and 8 deletions

View File

@@ -37,19 +37,17 @@ pub trait WasiFile {
fn num_ready_bytes(&self) -> Result<u64, Error>; // read op
}
// XXX we will add pipes to wasi - lets add it to this internal enum and present them as
// Unknown to old wasis
// XXX put the enum variants in same order as WASI so conversion funcs are no-op
#[derive(Debug, Copy, Clone)]
pub enum FileType {
Directory,
Unknown,
BlockDevice,
CharacterDevice,
Directory,
RegularFile,
SocketDgram,
SocketStream,
SymbolicLink,
Unknown,
Pipe,
}
bitflags! {