Deprecate set_created. set_accessed, set_modified methods on File

This commit is contained in:
Rafał Harabień 2018-06-28 18:58:29 +02:00
parent ecef2627a7
commit 881cf7709d

View File

@ -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);