#include <xtd/xtd>
class program {
public:
static auto main() {
try {
if (di.exists()) {
console::write_line("That path exists already.");
return;
}
di.create();
console::write_line("The directory was created successfully.");
di.remove();
console::write_line("The directory was deleted successfully.");
}
console::write_line(
"The process failed: {0}",
e.to_string());
}
}
};
Defines the base class for predefined exceptions in the xtd namespace.
Definition exception.h:26
Exposes instance methods for creating, moving, and enumerating through directories and subdirectories...
Definition directory_info.h:129
#define startup_(main_method)
Defines the entry point to be called when the application loads. Generally this is set either to the ...
Definition startup.h:175
The xtd::io namespace contains types that allow reading and writing to files and data streams,...
Definition binary_reader.h:16
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10