We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ea9283 commit daa1d41Copy full SHA for daa1d41
src/main.rs
@@ -884,6 +884,28 @@ impl Executor {
884
}
885
886
887
+ // ディレクトリを作成
888
+ "mkdir" => {
889
+ let name = self.pop_stack().get_string();
890
+ if let Err(e) = fs::create_dir(name) {
891
+ self.log_print(format!("エラー! {e}"))
892
+ }
893
894
+
895
+ // アイテムを削除
896
+ "rm" => {
897
898
+ if Path::new(name.as_str()).is_dir() {
899
+ if let Err(e) = fs::remove_dir(name) {
900
901
902
+ } else {
903
+ if let Err(e) = fs::remove_file(name) {
904
905
906
907
908
909
// ファイル一覧のリスト
910
"ls" => {
911
if let Ok(entries) = fs::read_dir(".") {
0 commit comments