Sha256: 54a22d0eb6e80614ce3518f82bdb59794c51574dac64ebd54200b858190383da

Contents?: true

Size: 695 Bytes

Versions: 6

Compression:

Stored size: 695 Bytes

Contents

module Pod
  module DirUtil
    def create_target_directory_path_by_spec spec,force
      target_dir = "#{Dir.pwd}/#{spec.name}-#{spec.version}"

      if File.exist? target_dir
        if @force
          Pathname.new(target_dir).rmtree
        else
          UI.warn "Target directory '#{target_dir}' already exists."
        end
      end
      target_dir
    end

    def create_working_directory_by_spec spec,force
      target_dir = create_target_directory_path_by_spec spec,force
      # Pathname.new(target_dir).mkdir
      work_dir = Dir.tmpdir + '/frameworks-' + Array.new(8) { rand(36).to_s(36) }.join

      Pathname.new(work_dir).mkdir
      [target_dir, work_dir]
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cocoapods-xcframework-0.1.0 lib/cocoapods-framework/util/dir_util.rb
cocoapods-xcframework-0.0.8 lib/cocoapods-framework/util/dir_util.rb
cocoapods-xcframework-0.0.7 lib/cocoapods-framework/util/dir_util.rb
cocoapods-xcframework-0.0.6 lib/cocoapods-framework/util/dir_util.rb
cocoapods-xcframework-0.0.5 lib/cocoapods-framework/util/dir_util.rb
cocoapods-xcframework-0.0.4 lib/cocoapods-framework/util/dir_util.rb