Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the Desktop path in Ruby

Tags:

ruby

Is there a cross platform way to get the Dekstop path in Ruby ?


1 Answers

ENV['HOME'] + '/Desktop' should work on all windows. I'm not sure about osx, and linux often doesn't have a desktop

like image 189
pguardiario Avatar answered May 26 '26 12:05

pguardiario



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!