Skip to content

Add getSharedDir() : non user-specific data/config directory#31

Merged
harawata merged 3 commits into
masterfrom
get-shared-dir
Apr 19, 2020
Merged

Add getSharedDir() : non user-specific data/config directory#31
harawata merged 3 commits into
masterfrom
get-shared-dir

Conversation

@harawata

Copy link
Copy Markdown
Owner

As discussed in #30 , this PR adds a new method getSharedDir() which returns the following directories.

  • macOS : /Users/Shared
  • Windows : C:\ProgramData
  • *nix : /srv

On macOS, /Users/Shared is writable to all users and this could be useful to desktop applications, for example.
I am not sure if this is useful on other platforms.

@harawata harawata added this to the 1.1.0 milestone Apr 15, 2020
@harawata harawata self-assigned this Apr 15, 2020
@harawata harawata merged commit 277a1e4 into master Apr 19, 2020
@harawata harawata modified the milestone: 1.1.0 Apr 19, 2020
@mrlimbic

mrlimbic commented Nov 7, 2020

Copy link
Copy Markdown

Just to let you know. It turns out that a fresh install of Mac OS creates the /Users/Shared directory.

However some methods of install such using migration assistant don't create it.

I've had to add a check in my app to warn the user to create it if not present. My app can't create it because desktop apps don't have sufficient permissions to create a directory in /Users

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants