From 881cf7709df03023d551ed671c76b0bdd4bef123 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Harabie=C5=84?= Date: Thu, 28 Jun 2018 18:58:29 +0200 Subject: [PATCH] Deprecate set_created. set_accessed, set_modified methods on File --- src/file.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/file.rs b/src/file.rs index 17b0242..1f6e248 100644 --- a/src/file.rs +++ b/src/file.rs @@ -93,7 +93,9 @@ impl<'a, T: ReadWriteSeek> File<'a, T> { /// Sets date and time of creation for this file. /// - /// Note: if `chrono` feature is enabled (default) library automatically updates all timestamps + /// Note: it is set to a value from the `TimeProvider` when creating a file. + /// Deprecated: if needed implement a custom `TimeProvider`. + #[deprecated] pub fn set_created(&mut self, date_time: DateTime) { if let Some(ref mut e) = self.entry { e.set_created(date_time); @@ -102,7 +104,9 @@ impl<'a, T: ReadWriteSeek> File<'a, T> { /// Sets date of last access for this file. /// - /// Note: if `chrono` feature is enabled (default) library automatically updates all timestamps + /// Note: it is overwritten by a value from the `TimeProvider` on every file read operation. + /// Deprecated: if needed implement a custom `TimeProvider`. + #[deprecated] pub fn set_accessed(&mut self, date: Date) { if let Some(ref mut e) = self.entry { e.set_accessed(date); @@ -111,7 +115,9 @@ impl<'a, T: ReadWriteSeek> File<'a, T> { /// Sets date and time of last modification for this file. /// - /// Note: if `chrono` feature is enabled (default) library automatically updates all timestamps + /// Note: it is overwritten by a value from the `TimeProvider` on every file write operation. + /// Deprecated: if needed implement a custom `TimeProvider`. + #[deprecated] pub fn set_modified(&mut self, date_time: DateTime) { if let Some(ref mut e) = self.entry { e.set_modified(date_time);