mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Hermit: Add File::set_time stub
This is not supported on hermit yet. This change is required for compiling std.
This commit is contained in:
parent
b11bf65e4a
commit
3b985b4dd6
@ -41,6 +41,9 @@ pub struct OpenOptions {
|
||||
mode: i32,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, Default)]
|
||||
pub struct FileTimes {}
|
||||
|
||||
pub struct FilePermissions(!);
|
||||
|
||||
pub struct FileType(!);
|
||||
@ -110,6 +113,11 @@ impl fmt::Debug for FilePermissions {
|
||||
}
|
||||
}
|
||||
|
||||
impl FileTimes {
|
||||
pub fn set_accessed(&mut self, _t: SystemTime) {}
|
||||
pub fn set_modified(&mut self, _t: SystemTime) {}
|
||||
}
|
||||
|
||||
impl FileType {
|
||||
pub fn is_dir(&self) -> bool {
|
||||
self.0
|
||||
@ -344,6 +352,10 @@ impl File {
|
||||
pub fn set_permissions(&self, _perm: FilePermissions) -> io::Result<()> {
|
||||
Err(Error::from_raw_os_error(22))
|
||||
}
|
||||
|
||||
pub fn set_times(&self, _times: FileTimes) -> io::Result<()> {
|
||||
Err(Error::from_raw_os_error(22))
|
||||
}
|
||||
}
|
||||
|
||||
impl DirBuilder {
|
||||
|
Loading…
Reference in New Issue
Block a user