getAppDataDirectory questions/ potential for getDotFileDirectory
maxkorp opened this issue · 0 comments
I've got some confusion regarding getAppDataDirectory
, and also a question about storing application dotfiles, which might be related.
My confusion is as such:
In windows, %AppData%
is user specific, as is ~/Library/Application Support
in mac (and anything in ~
, obviously). Correct me if I'm wrong, but /var/lib
is global across users, no?
Either way, the docs read to me as if it's meant to be global. If i'm wrong about /var/lib
, the docs might want a little love to clarify a bit, IMO. If I'm right, then things should be normalized to be all global or all user-specific.
Also, potentially related is the idea of a getDotFileDirectory
method, for getting the location to store dotfiles, eg the .atom
directory in the case of atom, or .myAppRC
, etc. %AppData% is the appropriate place on windows, but the places in
getAppDataDirectoryseem wrong for mac/linux. I'm not sure if this really is the intended purpose of
getAppDataDirectory`, or if they're better off side by side. This would be pretty simple to add, and I'd be happy to take care of it, if it's welcome.
getDotFileDirectory()
Get path to store application dotfiles for the user.
Return
- String Returns the absolute path or null if platform isn't supported
- Mac:
~
- Win:
%AppData%
- Linux:
~
- Mac:
Those values could be worked out a bit more, like checking for env.HOME
and env.USERNAME``env.LOGNAME
etc, but thats the gist of it.