[][src]Module places::util

Functions

ensure_url_path

If p is a file URL, return it, otherwise try and make it one.

normalize_path

As best as possible, convert p into an absolute path, resolving all symlinks along the way.

slice_up_to

Equivalent to &s[..max_len.min(s.len())], but handles the case where s.is_char_boundary(max_len) is false (which would otherwise panic).

unurl_path

Path is basically just a str with no validation, and so in practice it could contain a file URL. Rusqlite takes advantage of this a bit, and says AsRef<Path> but really means "anything sqlite can take as an argument".