Class: Puppet::FileSystem::RelativePathPattern

Inherits:
PathPattern show all
Defined in:
lib/puppet/file_system/path_pattern.rb

Constant Summary

Constants inherited from PathPattern

PathPattern::ABSOLUTE_UNIX, PathPattern::ABSOLUTE_WINDOWS, PathPattern::CURRENT_DRIVE_RELATIVE_WINDOWS, PathPattern::TRAVERSAL

Instance Method Summary collapse

Methods inherited from PathPattern

absolute, #glob, #prefix_with, relative, #to_s

Instance Method Details

#absolute?Boolean


71
72
73
# File 'lib/puppet/file_system/path_pattern.rb', line 71

def absolute?
  false
end

#validateObject


75
76
77
78
79
80
81
82
83
# File 'lib/puppet/file_system/path_pattern.rb', line 75

def validate
  super
  case @pathname.to_s
  when ABSOLUTE_WINDOWS
    raise(InvalidPattern, _("A relative PathPattern cannot be prefixed with a drive."))
  when ABSOLUTE_UNIX
    raise(InvalidPattern, _("A relative PathPattern cannot be an absolute path."))
  end
end