1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:27:45 +00:00

LibCore: Add File method to determine absolute path

This will generate absolute paths lexically rather than through a call
to realpath. The motivation for this is to generate absolute paths for
non-existent files in unveil calls, as realpath will not work if the
file does not exist.
This commit is contained in:
Timothy 2021-07-10 01:35:30 +10:00 committed by Ali Mohammad Pur
parent 3ae64c7c3d
commit 068802d58d
2 changed files with 15 additions and 0 deletions

View file

@ -36,6 +36,7 @@ public:
static bool exists(const String& filename);
static bool ensure_parent_directories(const String& path);
static String current_working_directory();
static String absolute_path(String const& path);
enum class RecursionMode {
Allowed,