class RubySMB::Fscc::FileInformation::FileRenameInformation

The FileRenameInformation Class as defined in [2.4.34.2 FileRenameInformation](msdn.microsoft.com/en-us/library/cc704597.aspx)

Constants

CLASS_LEVEL

Public Instance Methods

get_smb_version(obj = self) click to toggle source
# File lib/ruby_smb/fscc/file_information/file_rename_information.rb, line 26
def get_smb_version(obj = self)
  # Return version 1 by default in case the structure is not part of a
  # SMB packet. This way, we can still instantiate this structure
  # independently without breaking the "choice" logic.
  return 1 if obj.nil?
  smb_version = if obj.respond_to?(:smb_header)
                  1
                elsif obj.respond_to?(:smb2_header)
                  2
                else
                  get_smb_version(obj.parent)
                end
  return smb_version
end