diff --git a/Userland/Libraries/LibCore/StandardPaths.cpp b/Userland/Libraries/LibCore/StandardPaths.cpp index 2398b6f925..9adc689794 100644 --- a/Userland/Libraries/LibCore/StandardPaths.cpp +++ b/Userland/Libraries/LibCore/StandardPaths.cpp @@ -33,6 +33,14 @@ String StandardPaths::desktop_directory() return LexicalPath::canonicalized_path(builder.to_string()); } +String StandardPaths::documents_directory() +{ + StringBuilder builder; + builder.append(home_directory()); + builder.append("/Documents"sv); + return LexicalPath::canonicalized_path(builder.to_string()); +} + String StandardPaths::downloads_directory() { StringBuilder builder; diff --git a/Userland/Libraries/LibCore/StandardPaths.h b/Userland/Libraries/LibCore/StandardPaths.h index 80934cfe94..34a637adcb 100644 --- a/Userland/Libraries/LibCore/StandardPaths.h +++ b/Userland/Libraries/LibCore/StandardPaths.h @@ -14,6 +14,7 @@ class StandardPaths { public: static String home_directory(); static String desktop_directory(); + static String documents_directory(); static String downloads_directory(); static String tempfile_directory(); static String config_directory();