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 {
32 public:
34
37 static const drive_info empty;
39
41
47 explicit drive_info(const xtd::ustring& drive_name);
49
51
62 size_t available_free_space() const;
63
74
82
90 bool is_ready() const noexcept;
91
98 xtd::ustring name() const noexcept;
99
102 xtd::io::directory_info root_directory() const noexcept;
103
113 size_t total_free_space() const;
114
124 size_t total_size() const;
125
135 xtd::ustring volume_label() const;
137
139
144 xtd::ustring to_string() const noexcept override;
146
148
158 static std::vector<xtd::io::drive_info> get_drives() noexcept;
160
161 private:
162 drive_info() = default;
163
164 xtd::ustring drive_name_;
165 };
166 }
167}
Exposes instance methods for creating, moving, and enumerating through directories and subdirectories...
Definition directory_info.h:127
Provides access to information on a drive.
Definition drive_info.h:31
xtd::io::drive_type drive_type() const
Gets the drive type, such as CD-ROM, removable, network, or fixed.
drive_info(const xtd::ustring &drive_name)
Provides access to information on the specified drive.
xtd::ustring drive_format() const
Gets the name of the file system, such as NTFS or FAT32.
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:37
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.h:32
Represents text as a sequence of UTF-8 code units.
Definition ustring.h:47
Contains xtd::io::directory_info class.
Contains xtd::io::drive_type enum class.
drive_type
Defines constants for drive types, including CDRom, Fixed, Network, NoRootDirectory,...
Definition drive_type.h:24
#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