Skip to content

Commit

Permalink
RemoveFolder
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouhang95 committed Apr 17, 2024
1 parent 82c8b12 commit 19816e6
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions zeno/src/nodes/prim/SimpleGeometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1431,5 +1431,23 @@ ZENDEFNODE(CreateFolder, {
{},
{"create"},
});

struct RemoveFolder : zeno::INode {
virtual void apply() override {
namespace fs = std::filesystem;
auto folderPath = fs::u8path(get_input2<std::string>("folderPath"));
std::error_code errorCode;
fs::remove_all(folderPath, errorCode);
}
};

ZENDEFNODE(RemoveFolder, {
{
{"directory", "folderPath"}
},
{},
{},
{"create"},
});
}
}

0 comments on commit 19816e6

Please sign in to comment.