mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-17 00:26:44 -04:00
Add some support for absolute file paths
This commit is contained in:
parent
3dae421e40
commit
9fd20d4faf
@ -80,6 +80,7 @@ bool mkdir(const std::string& directory);
|
||||
bool touch(const std::string& file);
|
||||
bool rm(const std::string& file);
|
||||
std::string read_file(const std::string& file);
|
||||
std::string read_file(const std::string& file, const std::vector<std::string>& path);
|
||||
|
||||
const disk_descriptor* mounted_disk();
|
||||
const partition_descriptor* mounted_partition();
|
||||
|
@ -250,6 +250,14 @@ std::string disks::read_file(const std::string& file){
|
||||
return fat32::read_file(*_mounted_disk, *_mounted_partition, pwd, file);
|
||||
}
|
||||
|
||||
std::string disks::read_file(const std::string& file, const std::vector<std::string>& path){
|
||||
if(!_mounted_disk || !_mounted_partition){
|
||||
return "";
|
||||
}
|
||||
|
||||
return fat32::read_file(*_mounted_disk, *_mounted_partition, path, file);
|
||||
}
|
||||
|
||||
bool disks::mkdir(const std::string& directory){
|
||||
if(!_mounted_disk || !_mounted_partition){
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user