MCPcopy Create free account
hub / github.com/endbasic/endbasic / metadata

Method metadata

web/src/store.rs:115–124  ·  view source on GitHub ↗

Returns the generic `Metadata` object for this entry.

(&self)

Source from the content-addressed store, hash-verified

113
114 /// Returns the generic `Metadata` object for this entry.
115 fn metadata(&self) -> Metadata {
116 // I'm sure there is something wrong with this timezone adjustment.
117 let tz_offset = match UtcOffset::from_whole_seconds(
118 -js_sys::Date::new_0().get_timezone_offset() as i32 * 60,
119 ) {
120 Ok(tz_offset) => tz_offset,
121 Err(_) => UtcOffset::UTC,
122 };
123 Metadata { date: self.mtime.to_offset(tz_offset), length: self.content.len() as u64 }
124 }
125}
126
127/// Browser-based drive implementation that uses the local storage.

Callers 1

enumerateMethod · 0.45

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected