Reputation: 1509
I need to split remote file byLine with D. http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_day.csv
The examples show only how to work with files on FS. But can I work with remote files?
Upvotes: 1
Views: 60
Reputation: 1330
You can use std.net.curl.byLine
.
Example:
void main()
{
import std.net.curl, std.stdio;
string link = "http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_day.csv";
foreach (line; link.byLine())
{
writeln(line);
}
}
Upvotes: 2