pub struct DirEntry { /* private fields */ }
Expand description
DirEntry is returned by DirStream
during object list.
DirEntry carries two information: path and mode. Users can check returning dir entry’s mode or convert into an object without overhead.
Implementations
sourceimpl DirEntry
impl DirEntry
sourcepub fn into_object(self) -> Object
pub fn into_object(self) -> Object
sourcepub fn mode(&self) -> ObjectMode
pub fn mode(&self) -> ObjectMode
Return this dir entry’s object mode.
sourcepub fn id(&self) -> String
pub fn id(&self) -> String
Return this dir entry’s id.
The same with Object::id()
sourcepub fn path(&self) -> &str
pub fn path(&self) -> &str
Return this dir entry’s path.
The same with Object::path()
sourcepub fn name(&self) -> &str
pub fn name(&self) -> &str
Return this dir entry’s name.
The same with Object::name()
sourcepub fn etag(&self) -> Option<&str>
pub fn etag(&self) -> Option<&str>
The ETag string of DirEntry
’s corresponding object
etag
is a prefetched metadata field in DirEntry
.
It doesn’t mean this metadata field of object doesn’t exist if etag
is None
.
Then you have to call DirEntry::metadata()
to get the metadata you want.
sourcepub fn content_length(&self) -> Option<u64>
pub fn content_length(&self) -> Option<u64>
The size of DirEntry
’s corresponding object
content_length
is a prefetched metadata field in DirEntry
.
It doesn’t mean this metadata field of object doesn’t exist if content_length
is None
.
Then you have to call DirEntry::metadata()
to get the metadata you want.
sourcepub fn content_md5(&self) -> Option<&str>
pub fn content_md5(&self) -> Option<&str>
The MD5 message digest of DirEntry
’s corresponding object
content_md5
is a prefetched metadata field in DirEntry
It doesn’t mean this metadata field of object doesn’t exist if content_md5
is None
.
Then you have to call DirEntry::metadata()
to get the metadata you want.
sourcepub fn last_modified(&self) -> Option<OffsetDateTime>
pub fn last_modified(&self) -> Option<OffsetDateTime>
The last modified UTC datetime of DirEntry
’s corresponding object
last_modified
is a prefetched metadata field in DirEntry
It doesn’t mean this metadata field of object doesn’t exist if last_modified
is None
.
Then you have to call DirEntry::metadata()
to get the metadata you want.
sourcepub async fn metadata(&self) -> Result<ObjectMetadata>
pub async fn metadata(&self) -> Result<ObjectMetadata>
Fetch metadata about this dir entry.
The same with Object::metadata()
sourcepub fn blocking_metadata(&self) -> Result<ObjectMetadata>
pub fn blocking_metadata(&self) -> Result<ObjectMetadata>
Fetch metadata about this dir entry.
The same with Object::blocking_metadata()