LibCore: Add documents_directory() to StandardPaths

This commit is contained in:
thankyouverycool 2022-09-23 10:34:06 -04:00 committed by Ali Mohammad Pur
parent 72c0414a58
commit bd66453e8d
Notes: sideshowbarker 2024-07-17 20:19:08 +09:00
2 changed files with 9 additions and 0 deletions

View file

@ -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;

View file

@ -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();