def write_file(metadata)
      File.open(create_full_path(@file_name_prefix), "w", DEFAULT_FILE_MODE) { |f| f.write(metadata.to_s) }
    end
def write_file(metadata)
      File.open(create_full_path(@file_name_prefix), "w", DEFAULT_FILE_MODE) { |f| f.write(metadata.to_s) }
    end
Writes given metadata to file.

 === Parameters
 metadata(Hash):: Hash-like metadata to write
 subpath(Array|String):: subpath if deeper than root or nil

 === Return
 always true