diff options
| author | Tomoaki Kawada <kawada@kmckk.co.jp> | 2022-08-04 19:11:12 +0900 |
|---|---|---|
| committer | Tomoaki Kawada <kawada@kmckk.co.jp> | 2022-08-04 19:12:30 +0900 |
| commit | 0af4a288943a5a01672e82424b1d9269b741caf4 (patch) | |
| tree | 5d36b0fbb36439148a71942ce66c5b3ad9b7764c | |
| parent | caee496150a551fe1b9f77b3a58f7e66d54bc824 (diff) | |
| download | rust-0af4a288943a5a01672e82424b1d9269b741caf4.tar.gz rust-0af4a288943a5a01672e82424b1d9269b741caf4.zip | |
kmc-solid: Add a stub implementation of `File::set_times`
| -rw-r--r-- | library/std/src/sys/solid/fs.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/library/std/src/sys/solid/fs.rs b/library/std/src/sys/solid/fs.rs index a2cbee4dcf0..772b29f3a11 100644 --- a/library/std/src/sys/solid/fs.rs +++ b/library/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 { |
