-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolved conflicts after rebasing master and updated qnx file support…
… changes as per new structure Signed-off-by: Vasu1105 <vasundhara.jagdale@msystechnologies.com>
- Loading branch information
Vasu1105
committed
Oct 17, 2017
1 parent
357b401
commit a622ce0
Showing
4 changed files
with
44 additions
and
37 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# encoding: utf-8 | ||
# | ||
# author: Christoph Hartmann | ||
# author: Dominik Richter | ||
|
||
require 'train/file/remote/unix' | ||
|
||
module Train | ||
class File | ||
class Remote | ||
class Aix < Train::File::Remote::Unix | ||
def content | ||
cat = 'cat' | ||
cat = '/proc/boot/cat' if @backend.os[:release].to_i >= 7 | ||
@content ||= if !exist? | ||
nil | ||
else | ||
@backend.run_command("#{cat} #{@spath}").stdout || '' | ||
end | ||
end | ||
|
||
def type | ||
if @backend.run_command("file #{@spath}").stdout.include?('directory') | ||
return :directory | ||
else | ||
return :file | ||
end | ||
end | ||
|
||
%w{ | ||
mode owner group uid gid mtime size selinux_label link_path mounted stat | ||
}.each do |field| | ||
define_method field.to_sym do | ||
fail NotImplementedError, "QNX does not implement the #{m}() method yet." | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters