Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement file metadata, read, and write APIs. #4043

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
411 changes: 411 additions & 0 deletions src/shims/files.rs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/shims/io_error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ const WINDOWS_IO_ERROR_TABLE: &[(&str, std::io::ErrorKind)] = {
("ERROR_ACCESS_DENIED", PermissionDenied),
("ERROR_FILE_NOT_FOUND", NotFound),
("ERROR_INVALID_PARAMETER", InvalidInput),
("ERROR_FILE_EXISTS", AlreadyExists),
]
};

Expand Down
4 changes: 3 additions & 1 deletion src/shims/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

mod alloc;
mod backtrace;
mod files;
#[cfg(unix)]
mod native_lib;
mod unix;
Expand All @@ -18,7 +19,8 @@ pub mod panic;
pub mod time;
pub mod tls;

pub use self::unix::{DirTable, EpollInterestTable, FdTable};
pub use self::files::FdTable;
pub use self::unix::{DirTable, EpollInterestTable};

/// What needs to be done after emulating an item (a shim or an intrinsic) is done.
pub enum EmulateItemResult {
Expand Down
Loading
Loading