We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cb78721 commit 2663dabCopy full SHA for 2663dab
1 file changed
src/main.rs
@@ -2,6 +2,7 @@ use opener;
2
use rand::seq::SliceRandom;
3
use std::collections::HashMap;
4
use std::env;
5
+use std::path::Path;
6
use std::fs::{self, File};
7
use std::io::{self, Error, Read, Write};
8
use std::thread;
@@ -900,6 +901,12 @@ impl Executor {
900
901
}
902
903
904
+ "folder" => {
905
+ let path = self.pop_stack().get_string();
906
+ let path = Path::new(path.as_str());
907
+ self.stack.push(Type::Bool(path.is_dir()));
908
+ }
909
+
910
// コマンドとして認識されない場合は文字列とする
911
_ => self.stack.push(Type::String(command)),
912
0 commit comments