[Carpet] Carpet IO oddity
Thomas Radke
tradke at aei.mpg.de
Tue May 2 13:24:11 CEST 2006
Erik Schnetter wrote:
> We could, however, have the I/O subsystem (not the driver) check whether the output directory is empty when it is created. A new parameter IO::require_empty_output_directory or IO::require_new_output_directory could be introduced for this. This would be checked right after the call to IOUtil_CreateDirectory in IOUtil's Startup.c.
Good suggestion ! I put it on my list.
> Thomas, the second case (requiring that the output directory does not
> yet exist) is easy to check. But how does one check whether a
> directory is empty?
One could use the readdir(3) function for that purpose. It is already
used in CactusBase/IOUtil in order to find the latest checkpoint file in
IO::recover = "auto" mode.
--
Cheers, Thomas.
More information about the developers
mailing list