Files
metasploit-gs/lib/rex/ntpath.rb
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
334 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module Rex
module Ntpath
# @param [String] path The path to convert into a valid ntpath format
def self.as_ntpath(path)
Pathname.new(path)
.cleanpath
.each_filename
.drop_while { |file| file == '.' }
.join('\\')
end
end
end