-
Notifications
You must be signed in to change notification settings - Fork 2
/
printdirs.d
55 lines (46 loc) · 2.36 KB
/
printdirs.d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/+dub.sdl:
name "printdirs"
dependency "standardpaths" path="../"
+/
import std.stdio;
import standardpaths;
void main()
{
writeln("Home: ", homeDir());
writeln("\nUser directories");
writeln("Config: ", writablePath(StandardPath.config));
writeln("Cache: ", writablePath(StandardPath.cache));
writeln("Data: ", writablePath(StandardPath.data));
writeln("Desktop: ", writablePath(StandardPath.desktop));
writeln("Documents: ", writablePath(StandardPath.documents));
writeln("Pictures: ", writablePath(StandardPath.pictures));
writeln("Music: ", writablePath(StandardPath.music));
writeln("Videos: ", writablePath(StandardPath.videos));
writeln("Downloads: ", writablePath(StandardPath.downloads));
writeln("Templates: ", writablePath(StandardPath.templates));
writeln("Public: ", writablePath(StandardPath.publicShare));
writeln("Fonts: ", writablePath(StandardPath.fonts));
writeln("Applications: ", writablePath(StandardPath.applications));
writeln("Startup: ", writablePath(StandardPath.startup));
version(Windows) {
writeln("\nSpecific functions for Windows:");
writeln("Roaming data: ", writablePath(StandardPath.roaming));
writeln("Saved games: ", writablePath(StandardPath.savedGames));
}
writeln("\nSystem directories");
writefln("Config dirs: %-(%s, %)", standardPaths(StandardPath.config));
writefln("Cache dirs: %-(%s, %)", standardPaths(StandardPath.cache));
writefln("Data dirs: %-(%s, %)", standardPaths(StandardPath.data));
writefln("Font dirs: %-(%s, %)", standardPaths(StandardPath.fonts));
writefln("Applications dirs: %-(%s, %)", standardPaths(StandardPath.applications));
writefln("Startup dirs: %-(%s, %)", standardPaths(StandardPath.startup));
version(Windows) {
writefln("Desktop dirs: %-(%s, %)", standardPaths(StandardPath.desktop));
writefln("Documents dirs: %-(%s, %)", standardPaths(StandardPath.documents));
writefln("Downloads dirs: %-(%s, %)", standardPaths(StandardPath.downloads));
writefln("Pictures dirs: %-(%s, %)", standardPaths(StandardPath.pictures));
writefln("Music dirs: %-(%s, %)", standardPaths(StandardPath.music));
writefln("Videos dirs: %-(%s, %)", standardPaths(StandardPath.videos));
writefln("Templates dirs: %-(%s, %)", standardPaths(StandardPath.templates));
}
}