platformdirs 4.3.6-rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Jacob Hummer
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,170 @@
1
+ # `platformdirs` for JavaScript
2
+
3
+ 📂 Unified interface to get platform-specific directories
4
+
5
+ <table align=center><td>
6
+
7
+ <div><sub><i>Running on Linux</i></sub></div>
8
+
9
+ ```js
10
+ const dirs = new PlatformDirs("awesome-app", "octocat", "1.2")
11
+ console.log(dirs.userDataDir)
12
+ //=> /home/jcbhmr/.local/share/awesome-app/1.2
13
+ console.log(dirs.userConfigDir)
14
+ //=> /home/jcbhmr/.config/awesome-app/1.2
15
+
16
+ console.log(userRuntimeDir("other-app", "ferris", "4.5"))
17
+ //=> /run/user/33333/other-app/4.5
18
+ console.log(userLogDir("my-app", "gopher", "7.8"))
19
+ //=> /home/jcbhmr/.local/state/my-app/7.8/log
20
+ ```
21
+
22
+ </table>
23
+
24
+ <p align=center>
25
+ <a href="https://jsdocs.io/package/platformdirs">Documentation</a>
26
+ | <a href="https://pypi.org/project/platformdirs/">Original <code>platformdirs</code> project</a>
27
+ </p>
28
+
29
+ 🚀 Works on Windows, macOS, Linux, ~~and Android~~<sup>not yet</sup> \
30
+ ✅ Uses platform-specific best practices \
31
+ 🐍 A re-implementation of Python's [`platformdirs`](https://pypi.org/project/platformdirs/) package
32
+
33
+ ## Installation
34
+
35
+ ![npm](https://img.shields.io/static/v1?style=for-the-badge&message=npm&color=CB3837&logo=npm&logoColor=FFFFFF&label=)
36
+
37
+ You can install this package from [the npm registry](https://www.npmjs.com/) using npm, Yarn, pnpm, Bun, Deno, etc.
38
+
39
+ ```sh
40
+ npm install platformdirs
41
+ ```
42
+
43
+ ## Usage
44
+
45
+ ![Node.js](https://img.shields.io/static/v1?style=for-the-badge&message=Node.js&color=5FA04E&logo=Node.js&logoColor=FFFFFF&label=)
46
+ ![Deno](https://img.shields.io/static/v1?style=for-the-badge&message=Deno&color=222222&logo=Deno&logoColor=70FFAF&label=)
47
+ ![Bun](https://img.shields.io/static/v1?style=for-the-badge&message=Bun&color=000000&logo=Bun&logoColor=FFFFFF&label=)
48
+ ![Windows](https://img.shields.io/static/v1?style=for-the-badge&message=Windows&color=0078D4&logo=Windows&logoColor=FFFFFF&label=)
49
+ ![Linux](https://img.shields.io/static/v1?style=for-the-badge&message=Linux&color=222222&logo=Linux&logoColor=FCC624&label=)
50
+ ![macOS](https://img.shields.io/static/v1?style=for-the-badge&message=macOS&color=000000&logo=macOS&logoColor=FFFFFF&label=)
51
+
52
+
53
+ ```js
54
+ import * as fs from "node:fs/promises";
55
+ import * as path from "node:path";
56
+ import * as stream from "node:stream";
57
+ import * as platformdirs from "platformdirs";
58
+
59
+ const cacheDir = platformdirs.userCacheDir("awesome-app", "octocat", "1.2")
60
+ const bigCSVPath = path.join(cacheDir, "big.csv");
61
+ if (!fs.existsSync(bigCSVPath)) {
62
+ const response = await fetch("https://example.com/big.csv");
63
+ await response.body.pipeTo(stream.Writable.toWeb(fs.createWriteStream(bigCSVPath)));
64
+ }
65
+ ```
66
+
67
+ 📚 For more information check out [the documentation](https://jsdocs.io/package/platformdirs)
68
+
69
+ ```sh
70
+ npx platformdirs
71
+ ```
72
+
73
+ <details><summary>Output on Windows</summary>
74
+
75
+ ```
76
+
77
+ ```
78
+
79
+ </details>
80
+
81
+ <details><summary>Output on macOS</summary>
82
+
83
+ ```
84
+
85
+ ```
86
+
87
+ </details>
88
+
89
+ <details><summary>Output on Linux</summary>
90
+
91
+ ```
92
+ -- platformdirs 4.3.6 --
93
+ -- app dirs (with optional 'version')
94
+ user_data_dir: /home/me/.local/share/MyApp/1.0
95
+ user_config_dir: /home/me/.config/MyApp/1.0
96
+ user_cache_dir: /home/me/.cache/MyApp/1.0
97
+ user_state_dir: /home/me/.local/state/MyApp/1.0
98
+ user_log_dir: /home/me/.local/state/MyApp/1.0/log
99
+ user_documents_dir: /home/me/Documents
100
+ user_downloads_dir: /home/me/Downloads
101
+ user_pictures_dir: /home/me/Pictures
102
+ user_videos_dir: /home/me/Videos
103
+ user_music_dir: /home/me/Music
104
+ user_runtime_dir: /run/user/1000/MyApp/1.0
105
+ site_data_dir: /usr/local/share/MyApp/1.0
106
+ site_config_dir: /etc/xdg/MyApp/1.0
107
+ site_cache_dir: /var/cache/MyApp/1.0
108
+ site_runtime_dir: /run/MyApp/1.0
109
+
110
+ -- app dirs (without optional 'version')
111
+ user_data_dir: /home/me/.local/share/MyApp
112
+ user_config_dir: /home/me/.config/MyApp
113
+ user_cache_dir: /home/me/.cache/MyApp
114
+ user_state_dir: /home/me/.local/state/MyApp
115
+ user_log_dir: /home/me/.local/state/MyApp/log
116
+ user_documents_dir: /home/me/Documents
117
+ user_downloads_dir: /home/me/Downloads
118
+ user_pictures_dir: /home/me/Pictures
119
+ user_videos_dir: /home/me/Videos
120
+ user_music_dir: /home/me/Music
121
+ user_runtime_dir: /run/user/1000/MyApp
122
+ site_data_dir: /usr/local/share/MyApp
123
+ site_config_dir: /etc/xdg/MyApp
124
+ site_cache_dir: /var/cache/MyApp
125
+ site_runtime_dir: /run/MyApp
126
+
127
+ -- app dirs (without optional 'appauthor')
128
+ user_data_dir: /home/me/.local/share/MyApp
129
+ user_config_dir: /home/me/.config/MyApp
130
+ user_cache_dir: /home/me/.cache/MyApp
131
+ user_state_dir: /home/me/.local/state/MyApp
132
+ user_log_dir: /home/me/.local/state/MyApp/log
133
+ user_documents_dir: /home/me/Documents
134
+ user_downloads_dir: /home/me/Downloads
135
+ user_pictures_dir: /home/me/Pictures
136
+ user_videos_dir: /home/me/Videos
137
+ user_music_dir: /home/me/Music
138
+ user_runtime_dir: /run/user/1000/MyApp
139
+ site_data_dir: /usr/local/share/MyApp
140
+ site_config_dir: /etc/xdg/MyApp
141
+ site_cache_dir: /var/cache/MyApp
142
+ site_runtime_dir: /run/MyApp
143
+
144
+ -- app dirs (with disabled 'appauthor')
145
+ user_data_dir: /home/me/.local/share/MyApp
146
+ user_config_dir: /home/me/.config/MyApp
147
+ user_cache_dir: /home/me/.cache/MyApp
148
+ user_state_dir: /home/me/.local/state/MyApp
149
+ user_log_dir: /home/me/.local/state/MyApp/log
150
+ user_documents_dir: /home/me/Documents
151
+ user_downloads_dir: /home/me/Downloads
152
+ user_pictures_dir: /home/me/Pictures
153
+ user_videos_dir: /home/me/Videos
154
+ user_music_dir: /home/me/Music
155
+ user_runtime_dir: /run/user/1000/MyApp
156
+ site_data_dir: /usr/local/share/MyApp
157
+ site_config_dir: /etc/xdg/MyApp
158
+ site_cache_dir: /var/cache/MyApp
159
+ site_runtime_dir: /run/MyApp
160
+ ```
161
+
162
+ </details>
163
+
164
+ ## Development
165
+
166
+ ![Node.js](https://img.shields.io/static/v1?style=for-the-badge&message=Node.js&color=5FA04E&logo=Node.js&logoColor=FFFFFF&label=)
167
+ ![TypeScript](https://img.shields.io/static/v1?style=for-the-badge&message=TypeScript&color=3178C6&logo=TypeScript&logoColor=FFFFFF&label=)
168
+ ![Biome](https://img.shields.io/static/v1?style=for-the-badge&message=Biome&color=60A5FA&logo=Biome&logoColor=FFFFFF&label=)
169
+
170
+ This project uses Node.js, TypeScript, and npm. Why Node.js instead of [Deno](https://deno.com/) & [JSR](https://jsr.io/)? Because it's not as popular (yet). I'd love to use Deno & JSR but nobody knows what they are. This project does use [Biome](https://biomejs.dev/) instead of the usual [Prettier](https://prettier.io/) & [ESLint](https://eslint.org/) combo. Why? Because ESLint bungled their v9 release and Biome offers a more cohesive linter & formatter solution.
@@ -0,0 +1,81 @@
1
+ /**
2
+ * @module
3
+ * Android.
4
+ *
5
+ * TODO: Implement this module.
6
+ */
7
+ import { PlatformDirsABC } from "./api.js";
8
+ /**
9
+ * Follows the guidance [from here](https://android.stackexchange.com/a/216132).
10
+ *
11
+ * Makes use of the {@link PlatformDirsABC.appname},
12
+ * {@link PlatformDirsABC.version}, {@link PlatformDirsABC.ensureExists}.
13
+ */
14
+ export declare class Android extends PlatformDirsABC {
15
+ /**
16
+ * @return data directory tied to the user, e.g. `/data/user/<userid>/<packagename>/files/<AppName>`
17
+ */
18
+ get userDataDir(): string;
19
+ /**
20
+ * @return data directory shared by users, same as `userDataDir`
21
+ */
22
+ get siteDataDir(): string;
23
+ /**
24
+ * @return config directory tied to the user, e.g. `/data/user/<userid>/<packagename>/shared_prefs/<AppName>`
25
+ */
26
+ get userConfigDir(): string;
27
+ /**
28
+ * @return config directory shared by users, same as `userConfigDir`
29
+ */
30
+ get siteConfigDir(): string;
31
+ /**
32
+ * @return cache directory tied to the user, e.g. `/data/user/<userid>/<packagename>/cache/<AppName>`
33
+ */
34
+ get userCacheDir(): string;
35
+ /**
36
+ * @return cache directory shared by users, same as `userCacheDir`
37
+ */
38
+ get siteCacheDir(): string;
39
+ /**
40
+ * @return state directory tied to the user, same as `userDataDir`
41
+ */
42
+ get userStateDir(): string;
43
+ /**
44
+ * @return log directory tied to the user, same as `userCacheDir` if not opinionated else `log` in it, e.g. `/data/user/<userid>/<packagename>/cache/<AppName>/log`
45
+ */
46
+ get userLogDir(): string;
47
+ /**
48
+ * @return documents directory tied to the user, e.g. `/storage/emulated/0/Documents`
49
+ */
50
+ get userDocumentsDir(): string;
51
+ /**
52
+ * @return downloads directory tied to the user, e.g. `/storage/emulated/0/Downloads`
53
+ */
54
+ get userDownloadsDir(): string;
55
+ /**
56
+ * @return pictures directory tied to the user, e.g. `/storage/emulated/0/Pictures`
57
+ */
58
+ get userPicturesDir(): string;
59
+ /**
60
+ * @return videos directory tied to the user, e.g. `/storage/emulated/0/Movies`
61
+ */
62
+ get userVideosDir(): string;
63
+ /**
64
+ * @return music directory tied to the user, e.g. `/storage/emulated/0/Music`
65
+ */
66
+ get userMusicDir(): string;
67
+ /**
68
+ * @return desktop directory tied to the user, e.g. `/storage/emulated/0/Desktop`
69
+ */
70
+ get userDesktopDir(): string;
71
+ /**
72
+ * @return runtime directory tied to the user, same as `userCacheDir` if not opinionated else `tmp` in it, e.g. `/data/user/<userid>/<packagename>/cache/<AppName>/tmp`
73
+ */
74
+ get userRuntimeDir(): string;
75
+ /**
76
+ * @return runtime directory shared by users, same as `userRuntimeDir`
77
+ */
78
+ get siteRuntimeDir(): string;
79
+ }
80
+ /** @ignore @internal */
81
+ export declare function _androidFolder(): string | undefined;
@@ -0,0 +1,142 @@
1
+ /**
2
+ * @module
3
+ * Android.
4
+ *
5
+ * TODO: Implement this module.
6
+ */
7
+ import * as path from "node:path";
8
+ import { PlatformDirsABC } from "./api.js";
9
+ function throw2(error) {
10
+ throw error;
11
+ }
12
+ /**
13
+ * Follows the guidance [from here](https://android.stackexchange.com/a/216132).
14
+ *
15
+ * Makes use of the {@link PlatformDirsABC.appname},
16
+ * {@link PlatformDirsABC.version}, {@link PlatformDirsABC.ensureExists}.
17
+ */
18
+ export class Android extends PlatformDirsABC {
19
+ /**
20
+ * @return data directory tied to the user, e.g. `/data/user/<userid>/<packagename>/files/<AppName>`
21
+ */
22
+ get userDataDir() {
23
+ return this._appendAppNameAndVersion(_androidFolder() ?? throw2(new Error("unreachable")), "files");
24
+ }
25
+ /**
26
+ * @return data directory shared by users, same as `userDataDir`
27
+ */
28
+ get siteDataDir() {
29
+ return this.userDataDir;
30
+ }
31
+ /**
32
+ * @return config directory tied to the user, e.g. `/data/user/<userid>/<packagename>/shared_prefs/<AppName>`
33
+ */
34
+ get userConfigDir() {
35
+ return this._appendAppNameAndVersion(_androidFolder() ?? throw2(new Error("unreachable")), "shared_prefs");
36
+ }
37
+ /**
38
+ * @return config directory shared by users, same as `userConfigDir`
39
+ */
40
+ get siteConfigDir() {
41
+ return this.userConfigDir;
42
+ }
43
+ /**
44
+ * @return cache directory tied to the user, e.g. `/data/user/<userid>/<packagename>/cache/<AppName>`
45
+ */
46
+ get userCacheDir() {
47
+ return this._appendAppNameAndVersion(_androidFolder() ?? throw2(new Error("unreachable")), "cache");
48
+ }
49
+ /**
50
+ * @return cache directory shared by users, same as `userCacheDir`
51
+ */
52
+ get siteCacheDir() {
53
+ return this.userCacheDir;
54
+ }
55
+ /**
56
+ * @return state directory tied to the user, same as `userDataDir`
57
+ */
58
+ get userStateDir() {
59
+ return this.userDataDir;
60
+ }
61
+ /**
62
+ * @return log directory tied to the user, same as `userCacheDir` if not opinionated else `log` in it, e.g. `/data/user/<userid>/<packagename>/cache/<AppName>/log`
63
+ */
64
+ get userLogDir() {
65
+ let path2 = this.userCacheDir;
66
+ if (this.opinion) {
67
+ path2 = path.join(path2, "log");
68
+ }
69
+ return path2;
70
+ }
71
+ /**
72
+ * @return documents directory tied to the user, e.g. `/storage/emulated/0/Documents`
73
+ */
74
+ get userDocumentsDir() {
75
+ return androidDocumentsFolder();
76
+ }
77
+ /**
78
+ * @return downloads directory tied to the user, e.g. `/storage/emulated/0/Downloads`
79
+ */
80
+ get userDownloadsDir() {
81
+ return androidDownloadsFolder();
82
+ }
83
+ /**
84
+ * @return pictures directory tied to the user, e.g. `/storage/emulated/0/Pictures`
85
+ */
86
+ get userPicturesDir() {
87
+ return androidPicturesFolder();
88
+ }
89
+ /**
90
+ * @return videos directory tied to the user, e.g. `/storage/emulated/0/Movies`
91
+ */
92
+ get userVideosDir() {
93
+ return androidVideosFolder();
94
+ }
95
+ /**
96
+ * @return music directory tied to the user, e.g. `/storage/emulated/0/Music`
97
+ */
98
+ get userMusicDir() {
99
+ return androidMusicFolder();
100
+ }
101
+ /**
102
+ * @return desktop directory tied to the user, e.g. `/storage/emulated/0/Desktop`
103
+ */
104
+ get userDesktopDir() {
105
+ return "/storage/emulated/0/Desktop";
106
+ }
107
+ /**
108
+ * @return runtime directory tied to the user, same as `userCacheDir` if not opinionated else `tmp` in it, e.g. `/data/user/<userid>/<packagename>/cache/<AppName>/tmp`
109
+ */
110
+ get userRuntimeDir() {
111
+ let path2 = this.userCacheDir;
112
+ if (this.opinion) {
113
+ path2 = path.join(path2, "tmp");
114
+ }
115
+ return path2;
116
+ }
117
+ /**
118
+ * @return runtime directory shared by users, same as `userRuntimeDir`
119
+ */
120
+ get siteRuntimeDir() {
121
+ return this.userRuntimeDir;
122
+ }
123
+ }
124
+ /** @ignore @internal */
125
+ export function _androidFolder() {
126
+ throw new Error("Not implemented");
127
+ }
128
+ function androidDocumentsFolder() {
129
+ throw new Error("Not implemented");
130
+ }
131
+ function androidDownloadsFolder() {
132
+ throw new Error("Not implemented");
133
+ }
134
+ function androidPicturesFolder() {
135
+ throw new Error("Not implemented");
136
+ }
137
+ function androidVideosFolder() {
138
+ throw new Error("Not implemented");
139
+ }
140
+ function androidMusicFolder() {
141
+ throw new Error("Not implemented");
142
+ }
package/dist/api.d.ts ADDED
@@ -0,0 +1,232 @@
1
+ /**
2
+ * Base API.
3
+ * @module
4
+ */
5
+ /**
6
+ * Abstract base class for platform directories.
7
+ */
8
+ export declare abstract class PlatformDirsABC {
9
+ /**
10
+ * The name of the application.
11
+ */
12
+ appname: string | undefined;
13
+ /**
14
+ * The name of the app author or distributing body for this application.
15
+ *
16
+ * Typically it is the owning company name. Defaults to `appname`. You may pass `false` to disable it.
17
+ */
18
+ appauthor: string | false | undefined;
19
+ /**
20
+ * An optional version path element to append to the path.
21
+ *
22
+ * You might want to use this if you want multiple versions of your app to be able to run independently. If used, this would typically be `<major>.<minor>`.
23
+ */
24
+ version: string | undefined;
25
+ /**
26
+ * Whether to use the roaming appdata directory on Windows.
27
+ *
28
+ * That means that for users on a Windows network setup for roaming profiles, this user data will be synced on login (see [here](https://technet.microsoft.com/en-us/library/cc766489(WS.10).aspx)).
29
+ */
30
+ roaming: boolean;
31
+ /**
32
+ * An optional parameter which indicates that the entire list of data dirs should be returned.
33
+ *
34
+ * By default, the first item would only be returned.
35
+ */
36
+ multipath: boolean;
37
+ /**
38
+ * A flag to indicating to use opinionated values.
39
+ */
40
+ opinion: boolean;
41
+ /**
42
+ * Optionally create the directory (and any missing parents) upon access if
43
+ * it does not exist.
44
+ *
45
+ * By default, no directories are created.
46
+ *
47
+ * ⚠️ Since the getters (`dirs.userDataDir`, etc.) are synchronous, the
48
+ * directory creation will use `fs.mkdirSync()` which **is a blocking
49
+ * synchronous operation** to ensure that the returned path does indeed
50
+ * exist before returning the path to the caller. This is for convenience.
51
+ * If you require non-blocking async operation you should set this to
52
+ * `false` and use `fs.mkdir()` or `fsPromises.mkdir()` yourself.
53
+ */
54
+ ensureExists: boolean;
55
+ /**
56
+ * Create a new platform directory.
57
+ * @param appname See `appname`
58
+ * @param appauthor See `appauthor`
59
+ * @param version See `version`
60
+ * @param roaming See `roaming`
61
+ * @param multipath See `multipath`
62
+ * @param opinion See `opinion`
63
+ * @param ensureExists See `ensureExists`
64
+ */
65
+ constructor(appname?: string, appauthor?: string | false, version?: string, roaming?: boolean, multipath?: boolean, opinion?: boolean, ensureExists?: boolean);
66
+ /** @ignore @internal */
67
+ protected _appendAppNameAndVersion(...base: string[]): string;
68
+ /** @ignore @internal */
69
+ protected _optionallyCreateDirectory(dir: string): void;
70
+ /** @ignore @internal */
71
+ protected _firstItemAsPathIfMultipath(directory: string): string;
72
+ /**
73
+ * @return data directory tied to the user
74
+ */
75
+ abstract get userDataDir(): string;
76
+ /**
77
+ * @return data directory shared by users
78
+ */
79
+ abstract get siteDataDir(): string;
80
+ /**
81
+ * @return config directory tied to the user
82
+ */
83
+ abstract get userConfigDir(): string;
84
+ /**
85
+ * @return config directory shared by users
86
+ */
87
+ abstract get siteConfigDir(): string;
88
+ /**
89
+ * @return cache directory tied to the user
90
+ */
91
+ abstract get userCacheDir(): string;
92
+ /**
93
+ * @return cache directory shared by users
94
+ */
95
+ abstract get siteCacheDir(): string;
96
+ /**
97
+ * @return state directory tied to the user
98
+ */
99
+ abstract get userStateDir(): string;
100
+ /**
101
+ * @return log directory tied to the user
102
+ */
103
+ abstract get userLogDir(): string;
104
+ /**
105
+ * @return documents directory tied to the user
106
+ */
107
+ abstract get userDocumentsDir(): string;
108
+ /**
109
+ * @return downloads directory tied to the user
110
+ */
111
+ abstract get userDownloadsDir(): string;
112
+ /**
113
+ * @return pictures directory tied to the user
114
+ */
115
+ abstract get userPicturesDir(): string;
116
+ /**
117
+ * @return videos directory tied to the user
118
+ */
119
+ abstract get userVideosDir(): string;
120
+ /**
121
+ * @return music directory tied to the user
122
+ */
123
+ abstract get userMusicDir(): string;
124
+ /**
125
+ * @return desktop directory tied to the user
126
+ */
127
+ abstract get userDesktopDir(): string;
128
+ /**
129
+ * @return runtime directory tied to the user
130
+ */
131
+ abstract get userRuntimeDir(): string;
132
+ /**
133
+ * @return runtime directory shared by users
134
+ */
135
+ abstract get siteRuntimeDir(): string;
136
+ /**
137
+ * @return data path tied to the user
138
+ */
139
+ get userDataPath(): string;
140
+ /**
141
+ * @return data path shared by users
142
+ */
143
+ get siteDataPath(): string;
144
+ /**
145
+ * @return config path tied to the user
146
+ */
147
+ get userConfigPath(): string;
148
+ /**
149
+ * @return config path shared by users
150
+ */
151
+ get siteConfigPath(): string;
152
+ /**
153
+ * @return cache path tied to the user
154
+ */
155
+ get userCachePath(): string;
156
+ /**
157
+ * @return cache path shared by users
158
+ */
159
+ get siteCachePath(): string;
160
+ /**
161
+ * @return state path tied to the user
162
+ */
163
+ get userStatePath(): string;
164
+ /**
165
+ * @return log path tied to the user
166
+ */
167
+ get userLogPath(): string;
168
+ /**
169
+ * @return documents path tied to the user
170
+ */
171
+ get userDocumentsPath(): string;
172
+ /**
173
+ * @return downloads path tied to the user
174
+ */
175
+ get userDownloadsPath(): string;
176
+ /**
177
+ * @return pictures path tied to the user
178
+ */
179
+ get userPicturesPath(): string;
180
+ /**
181
+ * @return videos path tied to the user
182
+ */
183
+ get userVideosPath(): string;
184
+ /**
185
+ * @return music path tied to the user
186
+ */
187
+ get userMusicPath(): string;
188
+ /**
189
+ * @return desktop path tied to the user
190
+ */
191
+ get userDesktopPath(): string;
192
+ /**
193
+ * @return runtime path tied to the user
194
+ */
195
+ get userRuntimePath(): string;
196
+ /**
197
+ * @return runtime path shared by users
198
+ */
199
+ get siteRuntimePath(): string;
200
+ /**
201
+ * @yields all user and site configuration directories
202
+ */
203
+ iterConfigDirs(): Generator<string>;
204
+ /**
205
+ * @yields all user and site data directories
206
+ */
207
+ iterDataDirs(): Generator<string>;
208
+ /**
209
+ * @yields all user and site cache directories
210
+ */
211
+ iterCacheDirs(): Generator<string>;
212
+ /**
213
+ * @yields all user and site runtime directories
214
+ */
215
+ iterRuntimeDirs(): Generator<string>;
216
+ /**
217
+ * @yields all user and site state directories
218
+ */
219
+ iterConfigPaths(): Generator<string>;
220
+ /**
221
+ * @yields all user and site data directories
222
+ */
223
+ iterDataPaths(): Generator<string>;
224
+ /**
225
+ * @yields all user and site cache directories
226
+ */
227
+ iterCachePaths(): Generator<string>;
228
+ /**
229
+ * @yields all user and site runtime directories
230
+ */
231
+ iterRuntimePaths(): Generator<string>;
232
+ }