123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081(*
* Copyright (c) 2018-2022 Tarides <contact@tarides.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*)open!ImportmoduletypeArgs=sigmoduleHash:Irmin.Hash.SmoduleFm:File_manager.SmoduleDispatcher:Dispatcher.SwithmoduleFm=FmmoduleInode:Inode.Persistentwithtypehash:=Hash.tandtypekey=Hash.tPack_key.tandtypefile_manager=Fm.tandtypedispatcher=Dispatcher.tmoduleContents_pack:Pack_store.Swithtypehash:=Hash.tandtypekey=Hash.tPack_key.tandtypedispatcher=Dispatcher.tendmoduletypeSigs=sigmoduleMake(Args:Args):sigopenArgsmoduleExport:sigtypetvalv:Irmin.config->readContents_pack.t->readInode.Pack.t->tvalrun:?on_disk:[`Pathofstring]->t->(Contents_pack.value->unitLwt.t)->(Inode.Snapshot.inode->unitLwt.t)->Hash.tPack_key.t*Pack_value.Kind.t->intLwt.tvalclose:t->(unit,[>`Double_close|`Index_failureofstring|`Io_miscofFm.Io.misc_error|`Pending_flush|`Ro_not_allowed])resultendmoduleImport:sigtypetvalv:?on_disk:[`Pathofstring|`Reuse]->int->readContents_pack.t->readInode.Pack.t->tvalsave_contents:t->Contents_pack.value->Hash.tPack_key.tLwt.tvalsave_inodes:t->Inode.Snapshot.inode->Hash.tPack_key.tLwt.tvalclose:t->unitendendend