Class: Train::File::Remote::Aix

Inherits:
Unix show all
Defined in:
lib/train/file/remote/aix.rb

Constant Summary

Constants inherited from Train::File

DATA_FIELDS

Instance Method Summary collapse

Methods inherited from Unix

#content, #content=, #exist?, #grouped_into?, #linked_to?, #mode?, #path, #sanitize_filename, #unix_mode_mask

Methods inherited from Train::File::Remote

#basename, #stat

Methods inherited from Train::File

#block_device?, #character_device?, #directory?, #file?, #file_version, #initialize, #md5sum, #mounted?, #owned_by?, #path, #pipe?, #product_version, #sanitize_filename, #sha256sum, #socket?, #source, #source_path, #symlink?, #to_json, #type, #version?

Constructor Details

This class inherits a constructor from Train::File

Instance Method Details



7
8
9
10
11
12
# File 'lib/train/file/remote/aix.rb', line 7

def link_path
  return nil unless symlink?

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

#mountedObject



21
22
23
# File 'lib/train/file/remote/aix.rb', line 21

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


14
15
16
17
18
19
# File 'lib/train/file/remote/aix.rb', line 14

def shallow_link_path
  return nil unless symlink?

  @shallow_link_path ||=
    @backend.run_command("perl -e 'print readlink shift' #{@spath}").stdout.chomp
end