@@ -406,25 +406,33 @@ impl Metadata {
406406 self
407407 }
408408
409- /// Is_current of this entry .
409+ /// Determines if the provided metadata reflects the current status of the path .
410410 ///
411- /// Is_current is a boolean that can be used to identify
412- /// if the version of this entry is the latest version.
411+ /// - `Ok(true)` indicates it is the latest status.
412+ /// - `Ok(false)` indicates it is an older version of the file.
413+ /// - `None` indicates uncertainty about its status.
414+ ///
415+ /// This API allows users to verify if the version is up-to-date when listing with versions.
413416 pub fn is_current ( & self ) -> Option < bool > {
414417 self . is_current
415418 }
416419
417- /// Set is_current of this entry.
418- ///
419- /// For HeadObject without version_id, we will set it to Some(true).
420+ /// Set the `is_current` status of this entry.
420421 ///
421- /// For HeadObject with version_id, we will set it to None.
422- ///
423- /// For ListObjects, we will set all keys to Some(true)
422+ /// By default, this value will be `None`. Please avoid using this API if it's unclear whether the entry is current.
423+ /// Set it to `true` if it is known to be the latest; otherwise, set it to `false`.
424+ pub fn with_is_current ( mut self , is_current : Option < bool > ) -> Self {
425+ self . is_current = is_current;
426+ self
427+ }
428+
429+ /// Set the `is_current` status of this entry.
424430 ///
425- /// For ListObjectVersions, we will decide the value based on IsLatest.
426- pub fn set_is_current ( & mut self , is_current : bool ) {
431+ /// By default, this value will be `None`. Please avoid using this API if it's unclear whether the entry is current.
432+ /// Set it to `true` if it is known to be the latest; otherwise, set it to `false`.
433+ pub fn set_is_current ( & mut self , is_current : bool ) -> & mut Self {
427434 self . is_current = Some ( is_current) ;
435+ self
428436 }
429437
430438 /// User defined metadata of this entry
0 commit comments