Class: OmniAI::Tools::Disk::FileMoveTool
- Defined in:
- lib/omniai/tools/disk/file_move_tool.rb
Overview
Instance Method Summary collapse
Methods inherited from BaseTool
Constructor Details
This class inherits a constructor from OmniAI::Tools::Disk::BaseTool
Instance Method Details
#execute(old_path:, new_path:) ⇒ String
24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/omniai/tools/disk/file_move_tool.rb', line 24 def execute(old_path:, new_path:) @logger.info("#{self.class.name}#execute old_path=#{old_path.inspect} new_path=#{new_path.inspect}") FileUtils.mv( resolve!(path: old_path), resolve!(path: new_path) ) rescue SecurityError => e @logger.info("ERROR: #{e.}") raise e end |