Sha256: 6262c162ba4dfb323debbed056ad204622bbd72647cd9c147caf1f94c92a4381

Contents?: true

Size: 845 Bytes

Versions: 12

Compression:

Stored size: 845 Bytes

Contents

# frozen_string_literal: true

require_relative '../../puppet/util/logging'
require_relative '../../puppet/file_serving'
require_relative '../../puppet/file_serving/metadata'
require_relative '../../puppet/file_serving/content'

# Broker access to the filesystem, converting local URIs into metadata
# or content objects.
class Puppet::FileServing::Mount
  include Puppet::Util::Logging

  attr_reader :name

  def find(path, options)
    raise NotImplementedError
  end

  # Create our object.  It must have a name.
  def initialize(name)
    unless name =~ %r{^[-\w]+$}
      raise ArgumentError, _("Invalid mount name format '%{name}'") % { name: name }
    end

    @name = name

    super()
  end

  def search(path, options)
    raise NotImplementedError
  end

  def to_s
    "mount[#{@name}]"
  end

  # A noop.
  def validate
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
puppet-8.5.1 lib/puppet/file_serving/mount.rb
puppet-8.5.1-x86-mingw32 lib/puppet/file_serving/mount.rb
puppet-8.5.1-x64-mingw32 lib/puppet/file_serving/mount.rb
puppet-8.5.1-universal-darwin lib/puppet/file_serving/mount.rb
puppet-8.5.0 lib/puppet/file_serving/mount.rb
puppet-8.5.0-x86-mingw32 lib/puppet/file_serving/mount.rb
puppet-8.5.0-x64-mingw32 lib/puppet/file_serving/mount.rb
puppet-8.5.0-universal-darwin lib/puppet/file_serving/mount.rb
puppet-8.4.0 lib/puppet/file_serving/mount.rb
puppet-8.4.0-x86-mingw32 lib/puppet/file_serving/mount.rb
puppet-8.4.0-x64-mingw32 lib/puppet/file_serving/mount.rb
puppet-8.4.0-universal-darwin lib/puppet/file_serving/mount.rb