fun_folder_common/handler.rs
1extern crate notify;
2use notify::Op;
3
4pub trait FolderEventHandler{
5 fn handle_op(&self, op: Op){
6 if op == Op::CREATE {println!("CREATE");}
7 else if op == Op::RENAME {println!("RENAME");}
8 else if op == Op::RESCAN {println!("RESCAN");}
9 else if op == Op::REMOVE {println!("REMOVE");}
10 else if op == Op::WRITE {println!("WRITE");}
11 else if op == Op::CHMOD {println!("CHMOD");} // Unix only
12 else if op == Op::CLOSE_WRITE {println!("CLOSE_WRITE");} // Unix only
13 }
14}