1# frozen_string_literal: true 2 3module Rex 4 module Ntpath 5 6 # @param [String] path The path to convert into a valid ntpath format 7 def self.as_ntpath(path) 8 Pathname.new(path) 9 .cleanpath 10 .each_filename 11 .drop_while { |file| file == '.' } 12 .join('\\') 13 end 14 end 15end 16 17