terrazzo-terminal 0.2.7

A simple web-based terminal emulator built on Terrazzo.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#![cfg(feature = "server")]

use std::fs::Metadata;

use super::schema::PathSelector;

impl PathSelector {
    pub fn accept(self, metadata: &Metadata) -> bool {
        match self {
            Self::BasePath => metadata.is_dir(),
            Self::FilePath => true,
        }
    }
}