xtd 0.2.0
Loading...
Searching...
No Matches
drive.h
Go to the documentation of this file.
1
4#pragma once
6#if !defined(__XTD_CORE_NATIVE_LIBRARY__)
7#error "Do not include this file: Internal use only"
8#endif
10
11#include "drive_type.h"
12#include <xtd/core_native_export>
13#include <cstdint>
14#include <string>
15#include <vector>
16
18namespace xtd {
20 namespace io {
21 class drive_info;
22 }
24
27 namespace native {
35 class core_native_export_ drive final {
36 drive() = delete;
37 protected:
38 friend class xtd::io::drive_info;
39
41
50 static bool get_available_free_space(const std::string& root_path_name, size_t& free_bytes, size_t& total_number_of_bytes, size_t& total_number_of_free_bytes);
55 static int32_t get_drive_type(const std::string& root_path_name);
59 static std::vector<std::string> get_drives();
66 static bool get_volume_information(const std::string& root_path_name, std::string& volume_name, std::string& file_system_name);
72 static bool set_Volume_label(const std::string& root_path_name, const std::string& volume_name);
74 };
75 }
76}
Provides access to information on a drive.
Definition drive_info.h:33
Contains drive native API.
Definition drive.h:35
static bool get_available_free_space(const std::string &root_path_name, size_t &free_bytes, size_t &total_number_of_bytes, size_t &total_number_of_free_bytes)
Gets available free space for specified root path.
static int32_t get_drive_type(const std::string &root_path_name)
Gets drive type.
static bool set_Volume_label(const std::string &root_path_name, const std::string &volume_name)
Sets volume label.
static bool get_volume_information(const std::string &root_path_name, std::string &volume_name, std::string &file_system_name)
Gets volume information.
static std::vector< std::string > get_drives()
Gets system drive names array.
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.