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



411
412
413
414
415
416
417
418
419
420
421
# File 'lib/hammer_cli_katello/repository.rb', line 411

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

  if File.directory?(fullpath)
    Dir["#{fullpath}/*"]
  elsif File.exist?(fullpath)
    [fullpath]
  else
    Dir[fullpath]
  end
end