Implement File::matches_with(&Regex)
This commit is contained in:
parent
58bd36599f
commit
d89977a09e
1 changed files with 4 additions and 0 deletions
|
@ -266,6 +266,10 @@ impl File {
|
|||
self.id.clone()
|
||||
}
|
||||
|
||||
pub fn matches_with(&self, r: &Regex) -> bool {
|
||||
r.is_match(&self.data[..]) || self.header.matches_with(r)
|
||||
}
|
||||
|
||||
fn get_new_file_id() -> FileID {
|
||||
use uuid::Uuid;
|
||||
Uuid::new_v4().to_hyphenated_string()
|
||||
|
|
Loading…
Reference in a new issue