blue-sky
blue-sky

Reputation: 53806

What is the << operator?

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

Answers (1)

tim_yates
tim_yates

Reputation: 171084

It's the left shift operator

That line of code is calling File.leftShift( byte[] bytes ) (documentation here), so is writing the bytes from newtest into test

Upvotes: 6

Related Questions