Class: Train::File::Remote

Inherits:
Train::File show all
Defined in:
lib/train/file/remote.rb,
lib/train/file/remote/aix.rb,
lib/train/file/remote/qnx.rb,
lib/train/file/remote/unix.rb,
lib/train/file/remote/linux.rb,
lib/train/file/remote/windows.rb

Direct Known Subclasses

Unix, Windows

Defined Under Namespace

Classes: Aix, Linux, Qnx, Unix, Windows

Constant Summary

Constants inherited from Train::File

DATA_FIELDS

Instance Method Summary collapse

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

#basename(suffix = nil, sep = "/") ⇒ Object



4
5
6
7
8
# File 'lib/train/file/remote.rb', line 4

def basename(suffix = nil, sep = "/")
  raise "Not yet supported: Suffix in file.basename" unless suffix.nil?

  @basename ||= detect_filename(path, sep || "/")
end

#statObject



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

def stat
  return @stat if defined?(@stat)

  @stat = Train::Extras::Stat.stat(@spath, @backend, @follow_symlink)
end