Add nsIDirectoryService system entry for the OS's Documents folder
Categories
(Core :: XPCOM, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox127 | --- | fixed |
People
(Reporter: mconley, Assigned: mconley)
References
(Regressed 1 open bug)
Details
(Whiteboard: [fidefe-device-migration])
Attachments
(1 file)
There are certain things we'd like to offer to save in the user's Documents folder. I'd like to add an entry like this one, but for "Docs"
.
David Rubino dug out how we can ask the OS for this path.
On Windows, we can call SHGetKnownFolderPath(FOLDERID_Documents)
.
On macOS, we can call NSSearchPathForDirectoriesInDomains(NSDocumentDirectory)
On Linux, we can use the $XDG_DOCUMENTS_DIR
variable in ~/.config/user-dirs.dirs
, or if that doesn’t exist, use $HOME/Documents
.
Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
Assignee | ||
Comment 1•1 year ago
|
||
It looks like we actually used to have some limited support for the documents folder, at least on Windows and Linux. I'm not entirely certain if macOS ever had it implemented. Anyhow, support for this folder was removed in bug 1449686 as part of a broader initiative to cleanup unused special directories from the directory service.
I guess we're at a point now where we have a use case and can add the documents folders back.
Assignee | ||
Comment 2•1 year ago
|
||
Updated•1 year ago
|
Comment 4•1 year ago
|
||
bugherder |
Description
•