Reputation: 53806
Just trying to understand a line of code which copies a file:
new File("c:\\test") << new File("c:\\test\\newtest").bytes
What is the << known as ?
<<
Upvotes: 3
Views: 194
Reputation: 171084
It's the left shift operator
left shift operator
That line of code is calling File.leftShift( byte[] bytes ) (documentation here), so is writing the bytes from newtest into test
File.leftShift( byte[] bytes )
newtest
test
Upvotes: 6