Re: creating/copying files..



Carl wrote:
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.

actually the goal is not to create an empty file, but a file that I will be writing into, and will also need to copy, modify files... Roedy, as a "side effect of writing?" writing where?? :) thanks.. Frances
.




Relevant Pages

  • Re: creating/copying files..
    ... All I am saying in that new File does not create a file. ... there is no point in createNewFile. ... I was confused by your previous post that said "You can create with FileOutputStream and writing no bytes. ... that the goal was to create an empty file. ...
    (comp.lang.java.help)
  • Re: creating/copying files..
    ... >actually the goal is not to create an empty file, but a file that I will ... >be writing into, and will also need to copy, modify files... ... Prev by Date: ...
    (comp.lang.java.help)
  • Re: generating empty 1gb files
    ... steve wrote: ... > Can I use vbscript to generate an empty file that has a specified size? ... > I know that you can do it by opening a file for writing and then writing ...
    (microsoft.public.scripting.vbscript)
  • Re: Output
    ... > gives me an empty file and output to screen. ... It might be writing to stderr - try redirecting using ... Sic semper tyrannus - your dinosaur is ill. ...
    (alt.os.linux.suse)
  • generating empty 1gb files
    ... Can I use vbscript to generate an empty file that has a specified size? ... I know that you can do it by opening a file for writing and then writing ...
    (microsoft.public.scripting.vbscript)