Skip to main content

named_by_source

Function named_by_source 

Source
pub fn named_by_source(message: &str, file: &Path, source: &Path) -> String
Expand description

message with file, a temporary copy datui made, called source: what the user opened. A download or a decompressed CSV is read from a temp path the user never typed, and Polars names the file it was reading.

Only a whole mention is replaced: one that a path character neither precedes nor follows, so a longer path that merely starts or ends with the temp file’s (its name plus an extension, the same name in another directory) is left as it is. A full stop that ends a sentence still ends the mention.