Class: EhbrsRubyUtils::Fs::Iso9660File

Inherits:
Object
  • Object
show all
Defined in:
lib/ehbrs_ruby_utils/fs/iso_9660_file.rb

Direct Known Subclasses

Vg::Ps2::IsoFile

Constant Summary collapse

DEFAULT_EXTNAME =
'.iso'

Instance Method Summary collapse

Instance Method Details

#isoinfo_command(*command_args) ⇒ EacRubyUtils::Envs::Command

Parameters:

  • command_args (Array<String>)

Returns:

  • (EacRubyUtils::Envs::Command)


22
23
24
# File 'lib/ehbrs_ruby_utils/fs/iso_9660_file.rb', line 22

def isoinfo_command(*command_args)
  ::EacRubyUtils::Envs.local.command('isoinfo', '-i', path, *command_args)
end

#listArray<String>

Returns:

  • (Array<String>)


16
17
18
# File 'lib/ehbrs_ruby_utils/fs/iso_9660_file.rb', line 16

def list
  isoinfo_command('-f').execute!.each_line
end

#valid?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/ehbrs_ruby_utils/fs/iso_9660_file.rb', line 27

def valid?
  isoinfo_command.execute.fetch(:exit_code).zero?
end