class Fzeet::Windows::ShellItem

Public Instance Methods

path() click to toggle source
# File lib/fzeet/windows/shell/Common.rb, line 83
def path
        result = nil

        FFI::MemoryPointer.new(:pointer) { |pwcs|
                next unless GetDisplayName(SIGDN_FILESYSPATH, pwcs) == S_OK

                wcs = pwcs.read_pointer

                begin
                        result = Windows.WCSTOMBS(wcs)
                ensure
                        Windows.CoTaskMemFree(wcs)
                end
        }

        result
end