File: aix.rb

package info (click to toggle)
ruby-train 3.13.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,208 kB
  • sloc: ruby: 10,002; sh: 17; makefile: 8
file content (27 lines) | stat: -rw-r--r-- 629 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
require_relative "unix"

module Train
  class File
    class Remote
      class Aix < Train::File::Remote::Unix
        def link_path
          return nil unless symlink?

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

        def shallow_link_path
          return nil unless symlink?

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

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