]> matita.cs.unibo.it Git - helm.git/blobdiff - components/library/libraryMisc.ml
added default for matita.noiinertypes
[helm.git] / components / library / libraryMisc.ml
index 3f1931e42ce0e979e080c566381f47f572ddbdf8..7c82e27c40f3dd9564674e6d8c7c3c1a2ffb13d8 100644 (file)
 
 (* $Id$ *)
 
-let obj_file_of_baseuri ~basedir ~baseuri =
- let path = basedir ^ "/xml" ^ Pcre.replace ~pat:"^cic:" ~templ:"" baseuri in
-  path ^ ".moo"
+let resolve ~must_exist ~writable ~local baseuri = 
+  if must_exist then 
+    Http_getter.resolve ~local ~writable baseuri
+  else 
+    Http_getter.filename ~local ~writable baseuri
 
-let lexicon_file_of_baseuri ~basedir ~baseuri =
- let path = basedir ^ "/xml" ^ Pcre.replace ~pat:"^cic:" ~templ:"" baseuri in
-  path ^ ".lexicon"
+let obj_file_of_baseuri ~must_exist ~writable ~baseuri = 
+  resolve ~must_exist ~writable ~local:true baseuri ^ ".moo"
+let lexicon_file_of_baseuri ~must_exist ~writable ~baseuri = 
+  resolve ~must_exist ~writable ~local:true baseuri ^ ".lexicon"
 
-let metadata_file_of_baseuri ~basedir ~baseuri =
- let path = basedir ^ "/xml" ^ Pcre.replace ~pat:"^cic:" ~templ:"" baseuri in
-  path ^ ".metadata"