kmc-solid: Add a stub implementation of `File::set_times`

This commit is contained in:
Tomoaki Kawada 2022-08-04 19:11:12 +09:00
parent caee496150
commit 0af4a28894
1 changed files with 12 additions and 0 deletions

View File

@ -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 {