add io::Device::mkdir

This commit is contained in:
MihailRis
2025-02-04 14:10:23 +03:00
parent f8d0ded70e
commit 1ec8f89599
6 changed files with 37 additions and 9 deletions
+10 -2
View File
@@ -213,13 +213,21 @@ bool io::exists(const io::path& file) {
return device->exists(file.pathPart());
}
bool io::create_directory(const io::path& file) {
auto& device = io::require_device(file.entryPoint());
if (device.isdir(file.pathPart())) {
return false;
}
return device.mkdirs(file.pathPart());
}
bool io::create_directories(const io::path& file) {
auto& device = io::require_device(file.entryPoint());
if (device.isdir(file.pathPart())) {
return false;
}
device.mkdirs(file.pathPart());
return true;
return device.mkdirs(file.pathPart());
}
bool io::remove(const io::path& file) {