just 1.50.0

🤖 Just a command runner
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::*;

pub(crate) fn is_file(path: &Path) -> RunResult<'static, bool> {
  match path.metadata() {
    Ok(metadata) => Ok(metadata.is_file()),
    Err(source) => {
      if source.kind() == io::ErrorKind::NotFound {
        Ok(false)
      } else {
        Err(Error::FilesystemIo {
          path: path.into(),
          source,
        })
      }
    }
  }
}