Module: EightThree

Extended by:
FFI::Library
Defined in:
lib/eight_three.rb

Class Method Summary collapse

Class Method Details

.convert_path_to_8_3(path) ⇒ Object



17
18
19
20
21
22
23
24
25
26
# File 'lib/eight_three.rb', line 17

def self.convert_path_to_8_3 path
  out = FFI::MemoryPointer.new 256 # bytes
  path_to_8_3(path, out, out.size)
  out = out.get_string 0
  if out.size == 0
    raise 'unable to convert--probably file does not exist yet ' + path
  else
   out
  end
end