Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

getAppDataDirectory questions/ potential for getDotFileDirectory #17

@maxkorp

Description

@maxkorp

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 ingetAppDataDirectoryseem wrong for mac/linux. I'm not sure if this really is the intended purpose ofgetAppDataDirectory`, 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: ~

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions