diff options
| author | Martin Kröning <mkroening@posteo.net> | 2022-09-05 00:17:46 +0200 |
|---|---|---|
| committer | Martin Kröning <mkroening@posteo.net> | 2022-09-05 00:17:46 +0200 |
| commit | 3b985b4dd6c51e2939b23a0782579944fdf7a08c (patch) | |
| tree | e4862a114a66aabd0e1d2a07d86f89a6b392c8bb /library/std/src/sys | |
| parent | b11bf65e4aaa125952b6479a63f36e9e83efc32c (diff) | |
| download | rust-3b985b4dd6c51e2939b23a0782579944fdf7a08c.tar.gz rust-3b985b4dd6c51e2939b23a0782579944fdf7a08c.zip | |
Hermit: Add File::set_time stub
This is not supported on hermit yet. This change is required for compiling std.
Diffstat (limited to 'library/std/src/sys')
| -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 { |
