Hi,
We're trying to add some minor file browsing capabilities to our app. This works nicely using the native ruby File/Dir operations.
As an extra, for a windows desktop build we want to add another layer that lists all available drives. This should be possible by using the 'win32ole' library:
Example snippet:
require 'win32ole'
def get_drives_listing
result = []
WIN32OLE.new( "Scripting.FileSystemObject" ).Drives.each do |drive|
result drive.Path } if drive.IsReady
end
result
end
However, this library is not included when deploying the app, so attempting to run it after adding "require 'win32ole'" doesn't work.
Is there any way to include this properly? Or might there be a default Rho layer/directive to achieve this? (We're currently running Rho version 4.1.27)
Any help would be appreciated.
1 Replies
Have you looked at this part of the documentation:
http://docs.rhomobile.com/en/5.0.30/guide/ruby_extensions#adding-3rd-pa…
I have not tried it with this library before on Win32, but you need to include the Gem properly before trying to use it.