Module: Rex::Ntpath

Defined in:
lib/rex/ntpath.rb

Class Method Summary collapse

Class Method Details

.as_ntpath(path) ⇒ Object

Parameters:

  • path (String)

    The path to convert into a valid ntpath format



7
8
9
10
11
12
13
# File 'lib/rex/ntpath.rb', line 7

def self.as_ntpath(path)
  Pathname.new(path)
          .cleanpath
          .each_filename
          .drop_while { |file| file == '.' }
          .join('\\')
end