Module: ScoutApm::Logging::Utils
- Defined in:
- lib/scout_apm/logging/utils.rb
Overview
Miscellaneous utilities for the logging module.
Class Method Summary collapse
-
.ensure_directory_exists(file_path) ⇒ Object
Takes a complete file path, and ensures that the directory structure exists.
Class Method Details
.ensure_directory_exists(file_path) ⇒ Object
Takes a complete file path, and ensures that the directory structure exists.
10 11 12 13 14 |
# File 'lib/scout_apm/logging/utils.rb', line 10 def self.ensure_directory_exists(file_path) file_path = File.dirname(file_path) unless file_path[-1] == '/' FileUtils.mkdir_p(file_path) unless File.directory?(file_path) end |