Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/lib/rex/ntpath.rb
21517 views
1
# frozen_string_literal: true
2
3
module 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
15
end
16
17