unison

Fork of Unison, a bi-directional file synchronization tool
git clone git://git.laack.co/unison.git
Log | Files | Refs | README | LICENSE

props.mli (2575B)


      1 (* Unison file synchronizer: src/props.mli *)
      2 (* Copyright 1999-2020, Benjamin C. Pierce (see COPYING for details) *)
      3 
      4 (* File properties: time, permission, length, etc. *)
      5 
      6 type t251
      7 type _ props
      8 type basic = [`Basic] props
      9 type t = [`Full] props
     10 type x = [`ExtLoaded] props
     11 val m : t Umarshal.t
     12 val mbasic : basic Umarshal.t
     13 val mx : x Umarshal.t
     14 val to_compat251 : _ props -> t251
     15 val of_compat251 : t251 -> _ props
     16 val dummy : _ props
     17 val hash : t -> int -> int
     18 val hash251 : t251 -> int -> int
     19 val similar : t -> t -> bool
     20 val override : _ props -> 'a props -> 'a props
     21 val strip : t -> t
     22 val diff : t -> x -> x
     23 val toString : t -> string
     24 val syncedPartsToString : t -> string
     25 val set : Fspath.t -> Path.local -> [`Set | `Update] -> x -> unit
     26 val get' : Unix.LargeFile.stats -> basic
     27 val get : ?archProps:t -> Fspath.t -> Path.local -> Unix.LargeFile.stats -> Osx.info -> t
     28 val getWithRess : Unix.LargeFile.stats -> Osx.info -> basic
     29 val check : Fspath.t -> Path.local -> Unix.LargeFile.stats -> x -> unit
     30 val init : bool -> unit
     31 
     32 val loadExtData : Fspath.t -> Path.local -> t -> x
     33 val purgeExtData : x -> t
     34 val withExtData : t -> x
     35 (* [withExtData] will raise Not_found if some ext data is missing. In that
     36    case, [loadExtData] must be used to load any missing ext data. *)
     37 
     38 val same_time : _ props -> t -> bool
     39 val same_ctime : _ props -> t -> bool
     40 val length : _ props -> Uutil.Filesize.t
     41 val setLength : t -> Uutil.Filesize.t -> t
     42 val time : _ props -> float
     43 val setTime : t -> _ props -> t
     44 val resetCTime : t -> _ props -> t
     45 val perms : _ props -> int
     46 
     47 val fileDefault : basic
     48 val fileSafe : t
     49 val dirDefault : basic
     50 
     51 val syncModtimes : bool Prefs.t
     52 val permMask : int Prefs.t
     53 val dontChmod : bool Prefs.t
     54 val syncXattrs : bool Prefs.t
     55 val syncACL : bool Prefs.t
     56 
     57 val aclEnabled : unit -> bool
     58 val xattrEnabled : unit -> bool
     59 
     60 val xattrIgnorePred : Pred.t
     61 val xattrIgnorenotPred : Pred.t
     62 
     63 (* We are reusing the directory length to store a flag indicating that
     64    the directory is unchanged *)
     65 type dirChangedStamp
     66 val mdirChangedStamp : dirChangedStamp Umarshal.t
     67 val freshDirStamp : unit -> dirChangedStamp
     68 val changedDirStamp : dirChangedStamp
     69 val setDirChangeFlag : t -> dirChangedStamp -> int -> t * bool
     70 val dirMarkedUnchanged : t -> dirChangedStamp -> int -> bool
     71 
     72 val validatePrefs: unit -> unit
     73 
     74 module Data : sig
     75   type e
     76   type d = e list
     77 
     78   val m : d Umarshal.t
     79 
     80   val enabled : unit -> bool
     81 
     82   val extern : [`New] -> d
     83   val intern : d -> unit
     84   val merge : d -> unit
     85 
     86   val gcInit : unit -> unit
     87   val gcKeep : t -> unit
     88   val gcDone : unit -> d
     89 end