]> git.r.bdr.sh - rbdr/page/blame - src/file_handler/file_strategies/layout.rs
Ignore hidden files in root
[rbdr/page] / src / file_handler / file_strategies / layout.rs
CommitLineData
102a4884
RBR
1pub struct Strategy {}
2
3use std::path::PathBuf;
4
5use crate::file_handler::{FileType, FileHandlerStrategy};
6
7impl FileHandlerStrategy for Strategy {
8 fn is(&self, path: &PathBuf) -> bool {
9 return !path.is_dir() && path.ends_with("_layout.html");
10 }
11
12 fn identify(&self) -> FileType {
13 FileType::Layout
14 }
15
16 fn can_handle(&self, path: &PathBuf) -> bool {
17 self.is(path)
18 }
19
20 fn handle(&self, path: &PathBuf) {
21 println!("Should convert {}", path.display())
22 }
23}
24