Class: Train::Extras::AixFile

Inherits:
UnixFile show all
Defined in:
lib/train/extras/file_aix.rb

Instance Attribute Summary

Attributes inherited from UnixFile

#path

Instance Method Summary collapse

Methods inherited from UnixFile

#content, #exist?, #file_version, #initialize, #link_target, #product_version, #stat

Methods inherited from FileCommon

#basename, #block_device?, #character_device?, #directory?, #file?, #grouped_into?, #linked_to?, #md5sum, #mode?, #mounted?, #owned_by?, #pipe?, #sha256sum, #socket?, #symlink?, #type, #unix_mode_mask, #version?

Constructor Details

This class inherits a constructor from Train::Extras::UnixFile

Instance Method Details



8
9
10
11
12
13
# File 'lib/train/extras/file_aix.rb', line 8

def link_path
  return nil unless symlink?
  @link_path ||=
    @backend.run_command("perl -e 'print readlink shift' #{@spath}")
            .stdout.chomp
end

#mountedObject



15
16
17
18
# File 'lib/train/extras/file_aix.rb', line 15

def mounted
  @mounted ||=
    @backend.run_command("lsfs -c #{@spath}")
end