Class: Windows::FileSystem

Inherits:
Object
  • Object
show all
Defined in:
lib/microstation/app.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.windows_path(path) ⇒ Object



17
18
19
20
# File 'lib/microstation/app.rb', line 17

def self.windows_path(path)
  obj = new
  obj.windows_path(path)
end

Instance Method Details

#fs_objectObject



29
30
31
# File 'lib/microstation/app.rb', line 29

def fs_object
  @fs_object ||= WIN32OLE.new("Scripting.FileSystemObject")
end

#windows_path(path) ⇒ Object

Convert path to windows path

Parameters:

  • path (String, Pathname)

    the path you want to convert



24
25
26
27
# File 'lib/microstation/app.rb', line 24

def windows_path(path)
  path = path.to_path if path.respond_to? :to_path
  fs_object.GetAbsolutePathName(path.to_str)
end