mirror of
https://github.com/donl/homebrew-cask-versions.git
synced 2026-07-16 22:06:43 -06:00
16 lines
360 B
Ruby
16 lines
360 B
Ruby
module FileHelper
|
|
class << self
|
|
def local_binary_path(name)
|
|
File.expand_path(File.join(File.dirname(__FILE__), 'binaries', name))
|
|
end
|
|
|
|
def local_binary_url(name)
|
|
'file://' + local_binary_path(name)
|
|
end
|
|
|
|
def valid_alias?(candidate)
|
|
return false unless candidate.symlink?
|
|
candidate.readlink.exist?
|
|
end
|
|
end
|
|
end
|