module Lono::Utils::Item::FileMethods

Public Instance Methods

directory?() click to toggle source
# File lib/lono/utils/item/file_methods.rb, line 7
def directory?
  File.directory?(output_path)
end
exist?() click to toggle source
# File lib/lono/utils/item/file_methods.rb, line 3
def exist?
  File.exist?(output_path)
end
file?() click to toggle source
# File lib/lono/utils/item/file_methods.rb, line 11
def file?
  File.file?(output_path)
end
s3_path() click to toggle source
# File lib/lono/utils/item/file_methods.rb, line 15
def s3_path
  path = zip_file_path.gsub("#{Lono.root}/",'') # remove Lono.root
  "#{Lono.env}/#{path}"
end
zip_file_name() click to toggle source
# File lib/lono/utils/item/file_methods.rb, line 25
def zip_file_name
  "#{File.basename(output_path)}-#{@type}-#{Lono::Md5.sum(output_path)}.zip"
end
zip_file_path() click to toggle source

full path

# File lib/lono/utils/item/file_methods.rb, line 21
def zip_file_path
  "#{File.dirname(output_path)}/#{zip_file_name}"
end