1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374(*
* Copyright (c) 2018-2021 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!Importtypeheaders={offset:int63;generation:int63}moduletypeS=sigtypettypepath:=stringvalv:version:Version.toption->fresh:bool->readonly:bool->path->tvalname:t->stringvalclear:?keep_generation:unit->t->unitvalappend:t->string->unitvalset:t->off:int63->string->unitvalread:t->off:int63->bytes->intvalread_buffer:t->off:int63->buf:bytes->len:int->intvaloffset:t->int63valgeneration:t->int63valforce_headers:t->headersvalreadonly:t->boolvalversion:t->Version.tvalflush:t->unitvalclose:t->unitvalexists:string->boolvalsize:t->intvaltruncate:t->unit(** Sets the length of the underlying IO to be 0, without actually purging the
associated data. Not supported for stores beyond [`V1], which should use
{!clear} instead. *)valmigrate:progress:(int63->unit)->t->Version.t->(unit,[>`Msgofstring])result(** @raise Invalid_arg if the migration path is not supported. *)endmoduletypeSigs=sigtypenonrecheaders=headersmoduletypeS=SmoduleUnix:SmoduleCache:sigtype('a,'v)t={v:'a->?fresh:bool->?readonly:bool->string->'v;}valmemoize:v:('a->fresh:bool->readonly:bool->string->'v)->clear:('v->unit)->valid:('v->bool)->(root:string->string)->('a,'v)tendend