diff options
author | Timothy <timmot@users.noreply.github.com> | 2021-07-10 01:35:30 +1000 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2021-07-14 14:35:16 +0430 |
commit | 068802d58db1d0da7e11534a50279fdd76aa6618 (patch) | |
tree | 606520d9621f1d93c693b018bf52706d3a302e0c /Userland/Libraries/LibCore/File.h | |
parent | 3ae64c7c3d862b27ecab5bce2671c3abeff39766 (diff) | |
download | serenity-068802d58db1d0da7e11534a50279fdd76aa6618.zip |
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.
Diffstat (limited to 'Userland/Libraries/LibCore/File.h')
-rw-r--r-- | Userland/Libraries/LibCore/File.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Libraries/LibCore/File.h b/Userland/Libraries/LibCore/File.h index 814d21a6fc..419ec4b416 100644 --- a/Userland/Libraries/LibCore/File.h +++ b/Userland/Libraries/LibCore/File.h @@ -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, |