Class: SdrClient::Deposit::FileMetadataBuilderOperations::MimeType

Inherits:
Object
  • Object
show all
Defined in:
lib/sdr_client/deposit/file_metadata_builder_operations/mime_type.rb

Overview

Mime-type for this file.

Constant Summary collapse

NAME =
'mime_type'

Class Method Summary collapse

Class Method Details

.for(file_path:) ⇒ Object



11
12
13
14
# File 'lib/sdr_client/deposit/file_metadata_builder_operations/mime_type.rb', line 11

def self.for(file_path:, **)
  argv = Shellwords.escape(file_path)
  `file --mime-type -b #{argv}`.chomp
end