# File lib/facter/util/resolution.rb, line 72 72: def self.absolute_path?(path, platform=nil) 73: # Escape once for the string literal, and once for the regex. 74: slash = '[\\\\/]' 75: name = '[^\\\\/]+' 76: regexes = { 77: :windows => %r!^(([A-Z]:#{slash})|(#{slash}#{slash}#{name}#{slash}#{name})|(#{slash}#{slash}\?#{slash}#{name}))!i, 78: :posix => %r!^/!, 79: } 80: platform ||= Facter::Util::Config.is_windows? ? :windows : :posix 81: 82: !! (path =~ regexes[platform]) 83: end