sambala 0.8.5 → 0.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/sambala.rb +13 -0
- metadata +2 -2
data/lib/sambala.rb
CHANGED
@@ -99,6 +99,19 @@ class Sambala
|
|
99
99
|
execute('del', opts[:mask], opts[:queue])[0]
|
100
100
|
end
|
101
101
|
|
102
|
+
# The +exist?+ instance method is borrowed from Ruby File Class idiome.
|
103
|
+
# It is used to test the presence of files or directories on the server
|
104
|
+
# === Parameters
|
105
|
+
# * :mask = the mask matching the file or directory to look for.
|
106
|
+
# * :queue = sets queue processing mode. Defaults to interactive mode when no option given.
|
107
|
+
# === Interactive Returns
|
108
|
+
# * _boolean_ = confirm the presence of a matching file or directory
|
109
|
+
# === Example
|
110
|
+
# sam.exist?(:mask => 'aFile') # => true
|
111
|
+
def exist?(opts={:mask => nil, :queue => false})
|
112
|
+
execute('ls', opts[:mask], opts[:queue])[0]
|
113
|
+
end
|
114
|
+
|
102
115
|
# The +get+ instance method copy files from smb shares.
|
103
116
|
# As with the smbclient get command, the destination path is optional.
|
104
117
|
# === Parameters
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sambala
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Louis-Philippe Perron
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2009-01-05 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|