Module: Bowline::Desktop::Path
- Defined in:
- lib/bowline/desktop/path.rb
Class Method Summary collapse
-
.home ⇒ Object
Get the users home dir.
-
.user_data ⇒ Object
Get the app’s user data dir.
Class Method Details
.home ⇒ Object
Get the users home dir
12 13 14 |
# File 'lib/bowline/desktop/path.rb', line 12 def home Gem.user_home end |
.user_data ⇒ Object
Get the app’s user data dir.
-
Unix: ~/.appinfo
-
Windows: “C:Documents and SettingsusernameApplication Dataappinfo”
-
Mac: “~/Library/Application Support/appinfo”.
29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/bowline/desktop/path.rb', line 29 def user_data conf = Bowline.configuration case Bowline::Platform.type when :linux File.join(home, "." + conf.name) when :win32 File.join(home, "Application Data", conf.name) when :osx File.join(home, "Library", "Application Support", conf.name) end end |