copyTo

public final static File copyTo(InputStream $self, File file)

Copy data from this input stream to file.

Receiver

Caller has responsibility to close this stream


public final static File copyTo(URL $self, File file)

Copy data from this url to file. It will create the parent folder if it doesn't exist.