Sha256: e3209c8acbba7fef26482e3dd58baec57eddd4e71988150e485aba4aee0851a6

Contents?: true

Size: 563 Bytes

Versions: 17

Compression:

Stored size: 563 Bytes

Contents

module Lono::Utils::Item
  module FileMethods
    def exist?
      File.exist?(output_path)
    end

    def directory?
      File.directory?(output_path)
    end

    def file?
      File.file?(output_path)
    end

    def s3_path
      path = zip_file_path.gsub("#{Lono.root}/",'') # remove Lono.root
      "#{Lono.env}/#{path}"
    end

    # full path
    def zip_file_path
      "#{File.dirname(output_path)}/#{zip_file_name}"
    end

    def zip_file_name
      "#{File.basename(output_path)}-#{@type}-#{Lono::Md5.sum(output_path)}.zip"
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
lono-8.0.0.pre.rc2 lib/lono/utils/item/file_methods.rb
lono-8.0.0.pre.rc1 lib/lono/utils/item/file_methods.rb
lono-7.5.2 lib/lono/utils/item/file_methods.rb
lono-7.5.1 lib/lono/utils/item/file_methods.rb
lono-7.5.0 lib/lono/utils/item/file_methods.rb
lono-7.4.11 lib/lono/utils/item/file_methods.rb
lono-7.4.10 lib/lono/utils/item/file_methods.rb
lono-7.4.9 lib/lono/utils/item/file_methods.rb
lono-7.4.8 lib/lono/utils/item/file_methods.rb
lono-7.4.7 lib/lono/utils/item/file_methods.rb
lono-7.4.6 lib/lono/utils/item/file_methods.rb
lono-7.4.5 lib/lono/utils/item/file_methods.rb
lono-7.4.4 lib/lono/utils/item/file_methods.rb
lono-7.4.3 lib/lono/utils/item/file_methods.rb
lono-7.4.2 lib/lono/utils/item/file_methods.rb
lono-7.4.1 lib/lono/utils/item/file_methods.rb
lono-7.4.0 lib/lono/utils/item/file_methods.rb