Class: Puppet::FileSystem::RelativePathPattern Private

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

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Constant Summary

Constants inherited from PathPattern

PathPattern::ABSOLUTE_UNIX, PathPattern::ABSOLUTE_WINDOWS, PathPattern::CURRENT_DRIVE_RELATIVE_WINDOWS, PathPattern::DOTDOT

Instance Method Summary collapse

Methods inherited from PathPattern

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

Instance Method Details

#absolute?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


69
70
71
# File 'lib/puppet/file_system/path_pattern.rb', line 69

def absolute?
  false
end

#validateObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



73
74
75
76
77
78
79
80
# File 'lib/puppet/file_system/path_pattern.rb', line 73

def validate
  super
  if @pathstr.match?(ABSOLUTE_WINDOWS)
    raise(InvalidPattern, _("A relative PathPattern cannot be prefixed with a drive."))
  elsif @pathstr.match?(ABSOLUTE_UNIX)
    raise(InvalidPattern, _("A relative PathPattern cannot be an absolute path."))
  end
end