let out_channel_is_file ic = let fd = Unix.descr_of_out_channel ic in match (Unix.fstat fd).Unix.st_kind with | Unix.S_REG -> true | _ -> false