//! File utilities.

use crate::durandal::err::*;
use std::fs;

/// Confirms that the path `p` is a folder.
pub fn validate_folder_path(p: &str) -> ResultS<()>
{
   let at = fs::metadata(p)?;
   if at.is_dir() {
      Ok(())
   } else {
      Err(err_msg("not a directory"))
   }
}

// EOF
