Reputation: 23633
I searched the web, but all I found was a site that claimed that it could be done. It didn't say how.
Upvotes: 1
Views: 6594
Reputation: 12853
FileSystem fs = FileSystem.get(conf);
Path path = new Path("/my/path/file")
OutputStream os = fs.create(path)
// write to os
os.close()
Upvotes: 3
Reputation: 20969
Look at the FileSystem's API: Click me
There is a method called "create()".
Upvotes: 2