12 lines
271 B
C++
12 lines
271 B
C++
#include "vfs.h"
|
|
|
|
std::string get_full_path(vfs_node* node) {
|
|
if(node->parent == nullptr) {
|
|
return "/";
|
|
}
|
|
if(node->parent->parent == nullptr) { /* If parent is root. */
|
|
return "/" + node->name;
|
|
}
|
|
return get_full_path(node->parent) + "/" + node->name;
|
|
}
|