xtd 0.2.0
drive_info.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "../array.hpp"
6#include "../core_export.hpp"
7#include "../object.hpp"
8#include "directory_info.hpp"
9#include "drive_type.hpp"
10
12namespace xtd {
14 namespace io {
35 public:
37
40 static const drive_info empty;
42
44
50 explicit drive_info(const xtd::string& drive_name);
52
54 drive_info() = default;
56
58
69 size_t available_free_space() const;
70
81
89
97 bool is_ready() const noexcept;
98
105 xtd::string name() const noexcept;
106
109 xtd::io::directory_info root_directory() const noexcept;
110
120 size_t total_free_space() const;
121
131 size_t total_size() const;
132
142 xtd::string volume_label() const;
144
146
151 xtd::string to_string() const noexcept override;
153
155
165 static xtd::array<xtd::io::drive_info> get_drives() noexcept;
167
168 private:
169 xtd::string drive_name_;
170 };
171 }
172}
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Definition array.hpp:61
Represents text as a sequence of character units.
Definition basic_string.hpp:71
Exposes instance methods for creating, moving, and enumerating through directories and subdirectories...
Definition directory_info.hpp:130
Provides access to information on a drive.
Definition drive_info.hpp:34
xtd::io::drive_type drive_type() const
Gets the drive type, such as CD-ROM, removable, network, or fixed.
xtd::string drive_format() const
Gets the name of the file system, such as NTFS or FAT32.
drive_info(const xtd::string &drive_name)
Provides access to information on the specified drive.
size_t available_free_space() const
Indicates the amount of available free space on a drive, in bytes.
bool is_ready() const noexcept
Gets a value that indicates whether a drive is ready.
static const drive_info empty
Represents the uninitialized xtd::io::drive_info object. This field is constant.
Definition drive_info.hpp:40
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:43
Contains xtd::io::directory_info class.
Contains xtd::io::drive_type enum class.
@ io
I/O erreror occurs.
drive_type
Defines constants for drive types, including CDRom, Fixed, Network, NoRootDirectory,...
Definition drive_type.hpp:26
#define core_export_
Define shared library export.
Definition core_export.hpp:13
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10