diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-09-08 11:55:07 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-08 11:55:07 +0530 |
| commit | 7064344ba4641ab463e51ba28a1d1bbf3ae8fc76 (patch) | |
| tree | d870256157e681d4557e8979bb4de6e519ede0c0 | |
| parent | 0d61a507f5e110d4c242d4b4447ed028c12ddf0f (diff) | |
| parent | 3b985b4dd6c51e2939b23a0782579944fdf7a08c (diff) | |
| download | rust-7064344ba4641ab463e51ba28a1d1bbf3ae8fc76.tar.gz rust-7064344ba4641ab463e51ba28a1d1bbf3ae8fc76.zip | |
Rollup merge of #101422 - mkroening:hermit-file-time, r=joshtriplett
Hermit: Add File::set_time stub This is not supported on hermit yet. This change is required for compiling std.
| -rw-r--r-- | library/std/src/sys/hermit/fs.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/library/std/src/sys/hermit/fs.rs b/library/std/src/sys/hermit/fs.rs index 1c5efa94bd3..f921839cf52 100644 --- a/library/std/src/sys/hermit/fs.rs +++ b/library/std/src/sys/hermit/fs.rs @@ -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 { |
