Skip to content

reivilo/rsmbclient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My first gem cause sambala doesn't work with ruby 1.9 and require some other gems

By the way thanks to sambala ;) i don't reinvent the wheel ...

This class acts as a Ruby wrapper around the smbclient command line utility, allowing access to Samba (SMB, CIFS) shares from Ruby.

First release allow to browse some shares, get and put come in next releases

INSTALL :

> gem install rsmbclient

USE :

Example:

  smbclient = Rsmbclient.new( :host     =>  'server',
                              :share    =>  'myshare',
                              :user     =>  'olivier',
                              :password =>  'reivilo')
                      
  smbclient.cd('myfolder')   # =>  true
  smbclient.files => [["myfile", "A", 10, file datetime], ["myfile2", "A", 10, file datetime]]
  smbclient.dirs => [".", "..", "dir1", "dir2"]
  smbclient.path => "./myfolder"
  smbclient.close

MAC OS LION :
To get smbclient for lion please use brew formula :
> brew install https://raw.github.com/vertis/homebrew/master/Library/Formula/samba.rb

thanks to Homebrew/legacy-homebrew#5954


Copyright (c) 2011 IDFUZE.COM / Olivier DIRRENBERGER

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.