detect_language_from_path

Function detect_language_from_path 

Source
pub fn detect_language_from_path(path: &Path) -> Option<Language>
Expand description

Detect language from file path

ยงExamples

use rskim_core::{detect_language_from_path, Language};
use std::path::Path;

let path = Path::new("src/main.rs");
assert_eq!(detect_language_from_path(path), Some(Language::Rust));