# File lib/handlers/file.rb, line 51 def remove(file_name) file_list= FileListFile.new file_id= file_list.is_uploaded?(file_name) if options.remote? && file_id begin StudioApi::File.find(file_id).destroy say "File '#{file_name}' removed" rescue raise Thor::Error, "Couldn't remove file #{file_name} (id: #{file_id}" end elsif options.remote? && !file_id raise Thor::Error, "File '#{file_name}' not found" else file_list.push('remove', {file_name => nil}) file_list.save say "File '#{file_name}' marked for removal" end end