Platform.FSHigh-level filesystem operations
val with_temp_dir :
platform:TYPES.platform ->
default_pattern_prefix:string ->
?given_temp_dir:string ->
(temp_dir:string -> 'a) ->
'awith_temp_dir ~platform ?given_temp_dir f creates a temporary directory temp_dir and executes f ~temp_dir if given_temp_dir is None, or executes f ~temp_dir:dir if given_temp_dir is Some dir. temp_dir is removed upon termination of f in the former case; otherwise, the directory is left in place.
default_pattern_prefix is used to forge a name for the directory created, if any.