Method: FastlaneCore::FastlaneFolder.create_folder!

Defined in:
fastlane_core/lib/fastlane_core/fastlane_folder.rb

.create_folder!(path = nil) ⇒ Object



64
65
66
67
68
69
70
# File 'fastlane_core/lib/fastlane_core/fastlane_folder.rb', line 64

def self.create_folder!(path = nil)
  path = File.join(path || '.', FOLDER_NAME)
  return if File.directory?(path) # directory is already there
  UI.user_error!("Found a file called 'fastlane' at path '#{path}', please delete it") if File.exist?(path)
  FileUtils.mkdir_p(path)
  UI.success("Created new folder '#{path}'.")
end