Method: Hanami::Utils::Files.write
- Defined in:
- lib/hanami/utils/files.rb
permalink .write(path, *content) ⇒ Object
Creates a new file for the given path and content. All the intermediate directories are created.
32 33 34 35 |
# File 'lib/hanami/utils/files.rb', line 32 def self.write(path, *content) mkdir_p(path) open(path, ::File::CREAT | ::File::WRONLY | ::File::TRUNC, *content) # rubocop:disable Security/Open - this isn't a call to `::Kernel.open`, but to `self.open` end |