Class: HammerCLIKatello::Repository::UploadContentCommand::BinaryPath

Inherits:
HammerCLI::Options::Normalizers::File
  • Object
show all
Defined in:
lib/hammer_cli_katello/repository.rb

Instance Method Summary collapse

Instance Method Details

#format(path) ⇒ Object



179
180
181
182
183
184
185
186
187
# File 'lib/hammer_cli_katello/repository.rb', line 179

def format(path)
  fullpath = ::File.expand_path(path)

  if File.directory?(fullpath)
    Dir["#{fullpath}/*"].map { |file| ::File.new(file, 'rb') }
  else
    [::File.new(fullpath, 'rb')]
  end
end