MCPcopy Create free account
hub / github.com/Moosync/Moosync / convert_file_src

Function convert_file_src

src/utils/common.rs:131–141  ·  view source on GitHub ↗
(path: String)

Source from the content-addressed store, hash-verified

129
130#[tracing::instrument(level = "debug", skip(path))]
131pub fn convert_file_src(path: String) -> String {
132 if path.is_empty() || path.starts_with("asset:") || path == "favorites" {
133 return path;
134 }
135
136 if !path.starts_with("http:") && !path.starts_with("https:") {
137 let res = convertFileSrc(path.as_str(), "asset");
138 return res.as_string().unwrap();
139 }
140 path
141}
142
143#[tracing::instrument(level = "debug", skip(src))]
144pub async fn get_blob_url(src: String) -> String {

Callers 3

get_low_imgFunction · 0.85
get_high_imgFunction · 0.85
loadMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected