From 770fd52cc0976a1ee6e29fed6005e2f5d69d005e Mon Sep 17 00:00:00 2001 From: Tomoaki Kawada Date: Thu, 4 Aug 2022 19:11:12 +0900 Subject: [PATCH] kmc-solid: Add a stub implementation of `File::set_times` --- std/src/sys/solid/fs.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/std/src/sys/solid/fs.rs b/std/src/sys/solid/fs.rs index a2cbee4dc..772b29f3a 100644 --- a/std/src/sys/solid/fs.rs +++ b/std/src/sys/solid/fs.rs @@ -77,6 +77,9 @@ pub struct OpenOptions { custom_flags: i32, } +#[derive(Copy, Clone, Debug, Default)] +pub struct FileTimes {} + #[derive(Clone, PartialEq, Eq, Debug)] pub struct FilePermissions(c_short); @@ -126,6 +129,11 @@ impl 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.is(abi::S_IFDIR) @@ -452,6 +460,10 @@ impl File { pub fn set_permissions(&self, _perm: FilePermissions) -> io::Result<()> { unsupported() } + + pub fn set_times(&self, _times: FileTimes) -> io::Result<()> { + unsupported() + } } impl Drop for File {