Class: OmniAI::Tools::Disk::DirectoryListTool

Inherits:
BaseTool
  • Object
show all
Defined in:
lib/omniai/tools/disk/directory_list_tool.rb

Overview

Examples:

tool = OmniAI::Tools::Disk::SummaryTool.new(root: "./project")
tool.execute

Instance Method Summary collapse

Methods inherited from BaseTool

#initialize

Constructor Details

This class inherits a constructor from OmniAI::Tools::Disk::BaseTool

Instance Method Details

#execute(path: ".") ⇒ String

Returns:

  • (String)


17
18
19
20
21
22
23
24
# File 'lib/omniai/tools/disk/directory_list_tool.rb', line 17

def execute(path: ".")
  @logger.info("#{self.class.name}#execute")

  @driver.directory_list(path:)
rescue SecurityError => e
  @logger.error(e.message)
  raise e
end