Skip to main content

uri_for_path

Function uri_for_path 

Source
pub fn uri_for_path(path: &Path) -> String
Expand description

Re-export framework services (HTTP, URI, etc.) from the dedicated services crate. The file: URI for a path, which is what MediaItem takes.

Percent-encodes everything a URI reserves, so a track called Sgt. Pepper's #1.mp3 survives the trip. Lives here rather than in a backend because every backend that reads local files needs the same answer, and an application building an item needs it too.