Skip to content

Commit

Permalink
kmc-solid: Add a stub implementation of File::set_times
Browse files Browse the repository at this point in the history
  • Loading branch information
kawadakk committed Aug 4, 2022
1 parent d380cf3 commit 770fd52
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions std/src/sys/solid/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 770fd52

Please sign in to comment.