Re: creating/copying files..



Roedy Green wrote:
On Wed, 28 Dec 2005 22:47:23 GMT, Carl <_Nospam_@xxxxxxxxxxxx> wrote,
quoted or indirectly quoted someone who said :


Are you sure about that? It seems to work just fine for me.


All I am saying in that new File does not create a file. It is just a
handle to a file.  createNewFile or createTempFile will create a file
though if all you want is an empty file.  If you plan to write
something in it, there is no point in createNewFile. The file gets
created as needed as a side effect of writing.


Roedy,

Ok, I understand. I was confused by your previous post that said "You can create with FileOutputStream and writing no bytes. Just close." that the goal was to create an empty file.

Cheers,
Carl.
.



Relevant Pages

  • Re: creating/copying files..
    ... createNewFile or createTempFile will create a file though if all you want is an empty file. ... If you plan to write something in it, there is no point in createNewFile. ... I was confused by your previous post that said "You can create with FileOutputStream and writing no bytes. ...
    (comp.lang.java.help)
  • Re: creating/copying files..
    ... All I am saying in that new File does not create a file. ... there is no point in createNewFile. ... http://mindprod.com Java custom programming, consulting and coaching. ... Prev by Date: ...
    (comp.lang.java.help)