#include <xtd/io/drive_info>
#include <xtd/console>
#include <xtd/startup>
class program {
public:
static auto main() {
auto all_drives = drive_info::get_drives();
for (auto d : all_drives) {
console::write_line("Drive {0}", d.name());
console::write_line(" Drive type: {0}", d.drive_type());
if (d.is_ready() == true) {
console::write_line(" Volume label: {0}", d.volume_label());
console::write_line(" File system: {0}", d.drive_format());
console::write_line(" Available space to current user:{0, 15} bytes", d.available_free_space());
console::write_line(" Total available space: {0, 15} bytes", d.total_free_space());
console::write_line(" Total size of drive: {0, 15} bytes", d.total_size());
}
}
}
};
#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