Method: Longleaf::FilesystemStorageLocation#get_path_from_metadata_path

Defined in:
lib/longleaf/models/filesystem_storage_location.rb

#get_path_from_metadata_path(md_path) ⇒ String

Get that absolute path to the file associated with the provided metadata path

Raises:

  • (ArgumentError)

    if the md_path is not in this storage location



24
25
26
27
28
29
30
# File 'lib/longleaf/models/filesystem_storage_location.rb', line 24

def (md_path)
  raise ArgumentError.new("A file_path parameter is required") if md_path.nil? || md_path.empty?

  rel_path = @metadata_location.relative_file_path_for(md_path)

  File.join(@path, rel_path)
end