Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System folders? #58

Open
cheako opened this issue Sep 3, 2019 · 8 comments
Open

System folders? #58

cheako opened this issue Sep 3, 2019 · 8 comments

Comments

@cheako
Copy link

cheako commented Sep 3, 2019

Need to know if to use Program\ Files or /usr/share or /usr/games/share.

@Ralith
Copy link

Ralith commented Oct 27, 2019

It would be very helpful to have something exposing the contents of XDG_DATA_DIRS with the project suffix applied (or indeed at all).

@rope-hmg
Copy link

If this includes /Applications or /Users/name/Applications on the Mac that would be super useful.

@alkarkhi
Copy link

alkarkhi commented Jul 17, 2022

@soc Is this feature something you'd want in this crate? I might be able to dedicate some free time on this

@andrewbaxter
Copy link

These are all related: #87 #82 #78

@andrewbaxter
Copy link

andrewbaxter commented Jul 19, 2024

The readme says this

This library is intentionally focused on providing information on user-writable directories only, as there is no discernible benefit in returning a path that points to a user-level, writable directory on one operating system, but a system-level, read-only directory on another.

i.e. it seems to explicitly exclude system directories, which is unfortunate because the name "directories" suggests it'd be all-encompasing, at least to this degree.

I'd really like a one-stop shop library I can use where I just call get_data_dir() or whatever and get the correct directory, regardless of operating environment (system service, systemd, user).

@cheako
Copy link
Author

cheako commented Jul 19, 2024

That's some misapplied philosophy. In science, it's clear that data should lead to conclusions instead of a conclusion filtering for data, however with software it's the users/clients who write the use cases... libraries shouldn't be written with a use case in mind, that's likewise backwards.

What this library does is return one set of directories for one OS and another set of directories for others, limiting the list of directories returned based on how the data is to be used is plainly wrong.

Edit: It's like the library trying to select what project's it's included in.

@andrewbaxter
Copy link

andrewbaxter commented Jul 19, 2024

Sorry, I might have misinterpreted that quote... it may be the important distinction is between writable and read-only directories and the "user" vs "system-level" thing is meant to be an example rather than criteria.

Regardless, it would be good if a maintainer could confirm a contribution in this regard would be considered, and maybe describe how the current architecture could be changed to accommodate.

@cheako
Copy link
Author

cheako commented Jul 19, 2024

Some system directories are writable /tmp, /dev/shm, /var/tmp... I don't know what these would be anywhere other than on Linux, but if Windows wants my apps they have to write the compatibility layer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants