class Fastlane::Actions::FileHelper

Public Class Methods

read(path) click to toggle source
# File lib/fastlane/plugin/gs_deliver/actions/gs_execute_command.rb, line 4
def self.read(path)
  file = File.open(path, "r+")
  res = file.read
  file.close
  res
end
write(path, str) click to toggle source
# File lib/fastlane/plugin/gs_deliver/actions/gs_execute_command.rb, line 10
def self.write(path, str)
  if not path.include? "."
    raise "Filepath has incorrect format. You must provide file extension"
  end
  require 'fileutils.rb'
  FileUtils.makedirs(File.dirname(path))
  file = File.open(path, "w+")
  file.write(str)
  file.close
end