Class: RestFtpDaemon::Remote
- Inherits:
-
Object
- Object
- RestFtpDaemon::Remote
show all
- Includes:
- BmcDaemonLib::LoggerHelper
- Defined in:
- lib/rest-ftp-daemon/remote.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(target, log_prefix, debug = false, ftpes = false) ⇒ Remote
Returns a new instance of Remote.
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/rest-ftp-daemon/remote.rb', line 14
def initialize target, log_prefix, debug = false, ftpes = false
@target = target
@ftpes = ftpes
@debug = !!debug
@job = Job.new(nil, {})
@log_prefix = log_prefix || {}
@logger = BmcDaemonLib::LoggerPool.instance.get :transfer
log_info "Remote.initialize debug[#{debug}] target[#{target.path}] "
prepare
end
|
Instance Attribute Details
#job ⇒ Object
Returns the value of attribute job.
9
10
11
|
# File 'lib/rest-ftp-daemon/remote.rb', line 9
def job
@job
end
|
#log_prefix ⇒ Object
Returns the value of attribute log_prefix.
8
9
10
|
# File 'lib/rest-ftp-daemon/remote.rb', line 8
def log_prefix
@log_prefix
end
|
#logger ⇒ Object
7
8
9
|
# File 'lib/rest-ftp-daemon/remote.rb', line 7
def logger
@logger
end
|
Instance Method Details
#chdir_or_create(directory, mkdir = false) ⇒ Object
49
50
|
# File 'lib/rest-ftp-daemon/remote.rb', line 49
def chdir_or_create directory, mkdir = false
end
|
#close ⇒ Object
55
56
57
58
59
|
# File 'lib/rest-ftp-daemon/remote.rb', line 55
def close
return unless @debug
puts "-------------------- SESSION CLOSING --------------------------"
end
|
#connect ⇒ Object
37
38
39
40
41
42
43
44
45
46
47
|
# File 'lib/rest-ftp-daemon/remote.rb', line 37
def connect
return unless @debug
puts
puts "-------------------- SESSION STARTING -------------------------"
puts "class\t #{myname}"
puts "host\t #{@target.host}"
puts "user\t #{@target.user}"
puts "port\t #{@target.port}"
puts "---------------------------------------------------------------"
end
|
#prepare ⇒ Object
34
35
|
# File 'lib/rest-ftp-daemon/remote.rb', line 34
def prepare
end
|
#remove!(target) ⇒ Object
52
53
|
# File 'lib/rest-ftp-daemon/remote.rb', line 52
def remove! target
end
|