xtd - Reference Guide  0.2.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
drive_info.h
Go to the documentation of this file.
1 #pragma once
5 
6 #include "../core_export.h"
7 #include "../object.h"
8 #include "directory_info.h"
9 #include "drive_type.h"
10 
12 namespace xtd {
14  namespace io {
30  class core_export_ drive_info : public xtd::object {
31  public:
33 
36  static const drive_info empty;
38 
40 
46  explicit drive_info(const xtd::ustring& drive_name);
48 
50 
61  size_t available_free_space() const;
62 
72  xtd::ustring drive_format() const;
73 
81 
89  bool is_ready() const noexcept;
90 
97  xtd::ustring name() const noexcept;
98 
101  xtd::io::directory_info root_directory() const noexcept;
102 
112  size_t total_free_space() const;
113 
123  size_t total_size() const;
124 
134  xtd::ustring volume_label() const;
136 
138 
148  static std::vector<xtd::io::drive_info> get_drives() noexcept;
149 
153  xtd::ustring to_string() const noexcept override;
155 
156  private:
157  drive_info() = default;
158 
159  xtd::ustring drive_name_;
160  };
161  }
162 }
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:50
std::string to_string(const date_time &value, const std::string &fmt, const std::locale &loc)
Convert a specified value into a string with specified format and locale.
Definition: date_time.h:1110
Exposes instance methods for creating, moving, and enumerating through directories and subdirectories...
Definition: directory_info.h:125
Contains xtd::io::drive_type enum class.
static const drive_info empty
Represents the uninitialized xtd::io::drive_info object. This field is constant.
Definition: drive_info.h:36
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes...
Definition: object.h:30
Provides access to information on a drive.
Definition: drive_info.h:30
Contains xtd::io::directory_info class.
drive_type
Defines constants for drive types, including CDRom, Fixed, Network, NoRootDirectory, Ram, Removable, and Unknown.
Definition: drive_type.h:20