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, #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



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

def link_path
  return nil unless symlink?

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

#mountedObject



23
24
25
# File 'lib/train/file/remote/aix.rb', line 23

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


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

def shallow_link_path
  return nil unless symlink?

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