Class: Msf::Modules::Loader::Directory

Inherits:
Base
  • Object
show all
Defined in:
lib/msf/core/modules/loader/directory.rb

Overview

Concerns loading module from a directory

Constant Summary

Constants inherited from Base

Base::DIRECTORY_BY_TYPE, Base::MODULE_EXTENSION, Base::MODULE_SEPARATOR, Base::NAMESPACE_MODULE_CONTENT, Base::NAMESPACE_MODULE_LINE, Base::NAMESPACE_MODULE_NAMES, Base::UNIT_TEST_REGEX

Instance Method Summary collapse

Methods inherited from Base

#initialize, #load_module, #load_modules, #reload_module

Constructor Details

This class inherits a constructor from Msf::Modules::Loader::Base

Instance Method Details

#loadable?(path) ⇒ true, false

Returns true if the path is a directory

Parameters:

  • path (String)

    Path under which there are modules

Returns:

  • (true)

    if path is a directory

  • (false)

    otherwise


8
9
10
11
12
13
14
# File 'lib/msf/core/modules/loader/directory.rb', line 8

def loadable?(path)
  if File.directory?(path)
    true
  else
    false
  end
end