53#include <system_error>
139 using Bitmask::Bitmask;
179 explicit Device(std::string_view path)
noexcept;
185 explicit Device(std::wstring_view path)
noexcept;
191 explicit Device(
const std::filesystem::path& path)
noexcept;
229 explicit operator
bool() const noexcept;
290 static constexpr const char* Name =
"StormByte.System.Device";
302 return "Broken symbolic link";
304 return "Device not found";
306 return "Path is not a classifiable device";
308 return "Device permission denied";
310 return "Device probe failed";
312 return "Unknown Device error";
336 struct is_error_code_enum<
StormByte::System::Device::Error>: true_type {};
Bitmask of AccessFlag.
Definition device.hxx:137
Query object for the medium behind a filesystem accessor.
Definition device.hxx:88
Error
Device classification and probe enumerators.
Definition device.hxx:96
@ NotADevice
The path exists but is not a classifiable file, directory or device node.
@ ProbeFailed
Classification I/O failed.
@ BrokenSymlink
The path is a symlink whose target does not exist.
@ DeviceNotFound
No volume or node could be resolved.
@ Permission
The process may not stat or access this path.
Device(const StormByte::String::String &path) noexcept
Store an owned UTF-8 accessor.
Device(std::string_view path) noexcept
Store a UTF-8 accessor view.
Device(std::wstring_view path) noexcept
Store a wide accessor as UTF-8 text.
Device(const std::filesystem::path &path) noexcept
Store a filesystem path as UTF-8 text.
AccessFlag
Transfer permission of this path for this process.
Definition device.hxx:128
Device(Device &&) noexcept=default
Move constructor.
Kind
Classified storage or network medium.
Definition device.hxx:111
Device(const Device &)=default
Copy constructor.
System module of the StormByte suite.
Definition device.hxx:58
const StormByte::Error::Category< Device::Error > & device_category() noexcept
Category singleton for Device::Error.
static std::string Message(StormByte::System::Device::Error e)
Text for one Device enumerator.
Definition device.hxx:297
Nominal sequential rates of the resolved medium.
Definition device.hxx:148
std::size_t write_bps
Nominal sequential write.
Definition device.hxx:150
std::size_t read_bps
Nominal sequential read.
Definition device.hxx:149
Suggested transfer windows derived from Throughput.
Definition device.hxx:159
StormByte::Size write
Suggested write window.
Definition device.hxx:161
StormByte::Size read
Suggested read window.
Definition device.hxx:160
#define STORMBYTE_SYSTEM_PUBLIC
Definition visibility.h:53