Now this supports file resource as $data.

Using INFILE method.