mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:37:46 +00:00
LibCore: Add a standard downloads directory (~/Downloads)
This commit is contained in:
parent
ae047649db
commit
76dd1e3284
3 changed files with 10 additions and 0 deletions
|
@ -93,6 +93,7 @@ printf "installing users... "
|
||||||
mkdir -p mnt/root
|
mkdir -p mnt/root
|
||||||
mkdir -p mnt/home/anon
|
mkdir -p mnt/home/anon
|
||||||
mkdir -p mnt/home/anon/Desktop
|
mkdir -p mnt/home/anon/Desktop
|
||||||
|
mkdir -p mnt/home/anon/Downloads
|
||||||
mkdir -p mnt/home/nona
|
mkdir -p mnt/home/nona
|
||||||
cp ../ReadMe.md mnt/home/anon/
|
cp ../ReadMe.md mnt/home/anon/
|
||||||
cp -r ../Libraries/LibJS/Tests mnt/home/anon/js-tests
|
cp -r ../Libraries/LibJS/Tests mnt/home/anon/js-tests
|
||||||
|
|
|
@ -53,6 +53,14 @@ String StandardPaths::desktop_directory()
|
||||||
return canonicalized_path(builder.to_string());
|
return canonicalized_path(builder.to_string());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String StandardPaths::downloads_directory()
|
||||||
|
{
|
||||||
|
StringBuilder builder;
|
||||||
|
builder.append(home_directory());
|
||||||
|
builder.append("/Downloads");
|
||||||
|
return canonicalized_path(builder.to_string());
|
||||||
|
}
|
||||||
|
|
||||||
String StandardPaths::tempfile_directory()
|
String StandardPaths::tempfile_directory()
|
||||||
{
|
{
|
||||||
return "/tmp";
|
return "/tmp";
|
||||||
|
|
|
@ -34,6 +34,7 @@ class StandardPaths {
|
||||||
public:
|
public:
|
||||||
static String home_directory();
|
static String home_directory();
|
||||||
static String desktop_directory();
|
static String desktop_directory();
|
||||||
|
static String downloads_directory();
|
||||||
static String tempfile_directory();
|
static String tempfile_directory();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue