ruby - Checking if a file exists in the user's home directory -


how i, say, determine if file ~/.my_proj_config exists on os in ruby?

a call dir.home os independent way home directory user. can use like

file.exists?(file.join(dir.home, ".my_proj_config")) 

Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -