Class: Chef::ReservedNames::Win32::API::File::REPARSE_DATA_BUFFER_SYMBOLIC_LINK

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/chef/win32/api/file.rb

Overview

typedef struct _REPARSE_DATA_BUFFER {

ULONG  ReparseTag;
USHORT ReparseDataLength;
USHORT Reserved;
union {
  struct {
    USHORT SubstituteNameOffset;
    USHORT SubstituteNameLength;
    USHORT PrintNameOffset;
    USHORT PrintNameLength;
    ULONG  Flags;
    WCHAR  PathBuffer[1];
  } SymbolicLinkReparseBuffer;
  struct {
    USHORT SubstituteNameOffset;
    USHORT SubstituteNameLength;
    USHORT PrintNameOffset;
    USHORT PrintNameLength;
    WCHAR  PathBuffer[1];
  } MountPointReparseBuffer;
  struct {
    UCHAR DataBuffer[1];
  } GenericReparseBuffer;
};

} REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER;

Instance Method Summary collapse

Instance Method Details


304
305
306
307
# File 'lib/chef/win32/api/file.rb', line 304

def print_name
  string_pointer = FFI::Pointer.new(pointer.address) + offset_of(:PathBuffer) + self[:PrintNameOffset]
  string_pointer.read_wstring(self[:PrintNameLength]/2)
end

#substitute_nameObject


300
301
302
303
# File 'lib/chef/win32/api/file.rb', line 300

def substitute_name
  string_pointer = FFI::Pointer.new(pointer.address) + offset_of(:PathBuffer) + self[:SubstituteNameOffset]
  string_pointer.read_wstring(self[:SubstituteNameLength]/2)
end