diff --git a/src/job.rs b/src/job.rs index 142e23b..1c0dacd 100644 --- a/src/job.rs +++ b/src/job.rs @@ -63,6 +63,20 @@ impl Job { }; } + pub fn has_job_file_extension(path: &Path) -> bool { + match path.extension() { + Some(x) => { + if ! "job".eq(x) { + return false; + } + }, + None => { + return false; + } + }; + return true; + } + pub fn new(url: &str, selector: &str, conf: &Conf) -> Job { let mut job = Job::default(conf); job.url = url.to_string();