fn prefix<T: AsRef<Path>>(path: T) -> String {
	let path = path.as_ref();

	let Some(prefix) = path.components().next() else {
		return "/".into();
	};

	match prefix {
		std::path::Component::Prefix(prefix_component) => {
			prefix_component.as_os_str().to_str().unwrap_or("/").into()
		}
		_ => "/".into(),
	}
}
Gets the root component of a given path.

This will be `/` on unix systems, or a Drive letter (`C:`, `D:`, etc)
crates/ignore-files/src/filter.rs