Class: MBuildFileUtils
- Defined in:
- lib/cocoapods-podspec-binary/utils/file_utils.rb
Overview
FileUtils: A utility class for file operations.
Class Method Summary collapse
Class Method Details
.compress_file(input_file, output_file) ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/cocoapods-podspec-binary/utils/file_utils.rb', line 20 def self.compress_file(input_file, output_file) File.open(input_file, 'rb') do |input| Zlib::GzipWriter.open(output_file) do |output| output.write(input.read) end end end |
.create_folder(folder_path) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/cocoapods-podspec-binary/utils/file_utils.rb', line 7 def self.create_folder(folder_path) if File.directory?(folder_path) puts 'Folder already exists.' else begin Dir.mkdir(folder_path) puts 'Folder created successfully!' rescue SystemCallError => e puts "Error creating folder: #{e.message}" end end end |