Basic path searching methods.
BROWSERS | = | %w{links elinks w3m lynx iexplore.exe explorer.exe} |
Find an application in your $PATH. Returns nil if the app couldn’t be found.
Example:
Path::find_app('ls') #=> '/bin/ls'
Find browser, or exit if a browser cannot be found.
Checks for ENV[‘RAGGLE_BROWSER’], ENV[‘BROWSER’], then looks for "links", "elinks", "w3m", "lynx", then finally "explorer.exe". If all those fail, then dies with an error message.
Example:
Path::find_browser #=> '/usr/bin/links'
Find home directory (different env vars on unix and win32).
Note: checks for ENV[‘HOME’], ENV[‘USERPROFILE’], then ENV[‘HOMEPATH’], and returns nil if none were found.
Example:
Path::find_home #=> '/home/pabs'