[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Q regarding svn_io_open_unique_file and persistent files

From: Ph. Marek <philipp.marek_at_bmlv.gv.at>
Date: 2004-12-23 07:58:51 CET

Hello everybody!

I have a question: How shall svn_io_open_unique_file be used, if the
destination file should stay in the filesystem (and already exists)?
- shall the file be opened with delete_on_close=TRUE, and renamed
  before it is closed?
  -> Failures on close lead to data loss, as possibly not everything
     could be written.
     (or is that avoided by the use of svn_io_file_flush_to_disk()?)
  -> It is a little bit "wrong" to unlink() a file which isn't valid
     any more (as it is renamed on close())
- shall the file be opened with delete_on_close=FALSE?
  -> If an SVN_ERR() cancels this function, the temporary file is left and
     takes space in the filesystem.
- shall it be opened with delete_on_close=TRUE, and before the
  svn_io_file_close() the flag is cleared?
 file->flags &= ~APR_DELONCLOSE;

Opinions, hints?

Thank you!

Regards,

Phil

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Dec 23 08:00:09 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.