This method is converting a list of (LiveCode) file paths to a list of 'file' type URLs. The input dataref needs to be converted to a stringref before anything else (you can assume the contents is a native encoded string):
```
  MCAutoStringRef t_input_files;
  /* UNCHECKED */ MCStringDecode(p_input, kMCStringEncodingMacRoman, false, &t_input_files);
```
I've also added a couple of other functions to libfoundation that should help make this a bit neater - MCStringBreakIntoChunks and MCListAppendFormat. This means you can update the function like this:
```
// First break the string into chunks using return as the delimiter. This
// gives us an array of ranges of the pieces between delimiters.
MCAutoPointer<MCRange> t_ranges;
uindex_t t_range_count;
/* UNCHECKED */ MCStringBreakIntoChunks(*t_input_files, '\n', kMCStringOptionCompareExact, &t_ranges, t_range_count);

// Create a mutable list ref.
MCListRef t_output_files;
/* UNCHECKED */ MCListCreateMutable('\n', &t_output_files);

// Loop through the ranges, using a formatted string and %*@ to append the appropriate portion of t_input_files as an element.
for(uindex_t i = 0; i < t_range_count; i++)
  /* UNCHECKED */ MCListAppendFormat(t_output_files, "file://%*@", &(*t_ranges)[i], *t_input_files);

// Build the output stringref.
MCStringRef t_output_files_string;
/* UNCHECKED */ MCListCopyAsStringAndRelease(t_output_files, t_output_files_string);

// Finally encode as native string and encapsulate in a dataref.
/* UNCHECKED */ MCStringEncodeAndRelease(t_output_files_string, kMCStringEncodingNative, false, r_output);

return true;
```