X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=components%2Fextlib%2FhExtlib.ml;h=07886f2690e8eaba64137d434f330793c2423e04;hb=5d5a1108d6c8198fc8425b914db803009941785a;hp=073c5695959480e657070af45a68ec3029132ef6;hpb=885b29af55a246589b6a8966d9d1438fbb8155d3;p=helm.git diff --git a/components/extlib/hExtlib.ml b/components/extlib/hExtlib.ml index 073c56959..07886f269 100644 --- a/components/extlib/hExtlib.ml +++ b/components/extlib/hExtlib.ml @@ -214,6 +214,16 @@ let is_dir fname = (Unix.stat fname).Unix.st_kind = Unix.S_DIR with Unix.Unix_error _ -> false +let writable_dir path = + try + let file = path ^ "/prova_matita" in + let oc = open_out file in + close_out oc; + Sys.remove file; + true + with Sys_error _ -> false + + let is_regular fname = try (Unix.stat fname).Unix.st_kind = Unix.S_REG