# File lib/archive/zip/entry.rb, line 957
    def extract(options = {})
      raise Zip::EntryError, 'link_target is nil' if link_target.nil?

      # Ensure that unspecified options have default values.
      file_path           = options.has_key?(:file_path) ?
                            options[:file_path].to_s :
                            @zip_path
      restore_permissions = options.has_key?(:permissions) ?
                            options[:permissions] :
                            false
      restore_ownerships  = options.has_key?(:ownerships) ?
                            options[:ownerships] :
                            false

      # Create the containing directory tree if necessary.
      parent_dir = ::File.dirname(file_path)
      FileUtils.mkdir_p(parent_dir) unless ::File.exist?(parent_dir)

      # Create the symlink.
      ::File.symlink(link_target, file_path)

      # Restore the metadata.
      # NOTE: Ruby does not have the ability to restore atime and mtime on
      # symlinks at this time (version 1.8.6).
      begin
        ::File.lchmod(mode, file_path) if restore_permissions
      rescue NotImplementedError
        # Ignore on platforms that do not support lchmod.
      end
      begin
        ::File.lchown(uid, gid, file_path) if restore_ownerships
      rescue NotImplementedError
        # Ignore on platforms that do not support lchown.
      end

      nil
    end