mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 03:51:50 +00:00
add io::Device::mkdir
This commit is contained in:
parent
f8d0ded70e
commit
1ec8f89599
6 changed files with 37 additions and 9 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue