xtd 0.2.0
Loading...
Searching...
No Matches
drive_info.h
Go to the documentation of this file.
1
4#pragma once
5#include "../core_export.h"
6#include "../object.h"
7#include "directory_info.h"
8#include "drive_type.h"
9
11namespace xtd {
13 namespace io {
34 public:
36
39 static const drive_info empty;
41
43
49 explicit drive_info(const xtd::string& drive_name);
51
53
64 size_t available_free_space() const;
65
76
84
92 bool is_ready() const noexcept;
93
100 xtd::string name() const noexcept;
101
104 xtd::io::directory_info root_directory() const noexcept;
105
115 size_t total_free_space() const;
116
126 size_t total_size() const;
127
137 xtd::string volume_label() const;
139
141
146 xtd::string to_string() const noexcept override;
148
150
160 static std::vector<xtd::io::drive_info> get_drives() noexcept;
162
163 private:
164 drive_info() = default;
165
166 xtd::string drive_name_;
167 };
168 }
169}
Represents text as a sequence of character units.
Definition basic_string.h:79
Exposes instance methods for creating, moving, and enumerating through directories and subdirectories...
Definition directory_info.h:129
Provides access to information on a drive.
Definition drive_info.h:33
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.h:39
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.h:42
Contains xtd::io::directory_info class.
drive_type
Defines constants for drive types, including CDRom, Fixed, Network, NoRootDirectory,...
Definition drive_type.h:26
#define core_export_
Define shared library export.
Definition core_export.h:13
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Contains xtd::io::drive_type enum class.