You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's currently no way to get a machine global (ie. non user/home scoped) data directory. This is useful for examples if you want to download large files that can be shared between users.
This would look something like:
Windows %PROGRAMDATA% (C:\ProgramData on Win10)
macOS /Library/Application Support
Linux $XDG_DATA_DIRS
This is currently supported by app-dirs via SharedData but the crate is unmaintained.
Would you be open to accepting a PR for this?
The text was updated successfully, but these errors were encountered:
Yes, you're welcome. But could you talk a bit about the API you planned to add?
I have some thoughts about this:
For dirs_next crate, we could either:
a. Add an enum Location { User, Shared, System } (?), use that enum as a parameter of free functions in dirs_next. But this is a breaking change. So we need to bump major version after doing this.
b. Add new free functions with shared_ prefix.
For directories crate:
a. Introduce a new SharedDirs struct?
Do you know if any other crates expose the same information?
SharedData is a variant of AppDataType enum. AppDataType is used as an argument to configure the behavior of app_dir function and friends.
That would be option 1a I listed above. And that will need a major version bump.
So I would like to hear more about what others think about this issue.
tesuji
added
the
C-proposal
Category: a proposal for something we might want to do, or maybe not; details still being worked out
label
Jan 10, 2021
There's currently no way to get a machine global (ie. non user/home scoped) data directory. This is useful for examples if you want to download large files that can be shared between users.
This would look something like:
%PROGRAMDATA%
(C:\ProgramData
on Win10)/Library/Application Support
$XDG_DATA_DIRS
This is currently supported by
app-dirs
viaSharedData
but the crate is unmaintained.Would you be open to accepting a PR for this?
The text was updated successfully, but these errors were encountered: