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



204
205
206
207
208
209
210
211
212
213
214
# File 'lib/hammer_cli_katello/repository.rb', line 204

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

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