fileinfo.mli (2084B)
1 (* Unison file synchronizer: src/fileinfo.mli *) 2 (* Copyright 1999-2020, Benjamin C. Pierce (see COPYING for details) *) 3 4 type typ = [`ABSENT | `FILE | `DIRECTORY | `SYMLINK] 5 val mtyp : typ Umarshal.t 6 val type2string : typ -> string 7 8 type t251 = { typ : typ; inode : int; desc : Props.t251; osX : Osx.info} 9 type ('a, 'b) info = private { typ : typ; inode : int; desc : 'a; osX : Osx.info } 10 constraint 'a = _ Props.props 11 type t = (Props.t, [`WithRess]) info 12 type basic = (Props.basic, [`NoRess]) info 13 type bress = (Props.basic, [`WithRess]) info 14 15 val basic : bress -> basic 16 17 val m : t Umarshal.t 18 val mbasic : basic Umarshal.t 19 20 val to_compat251 : basic -> t251 21 val of_compat251 : t251 -> basic 22 23 val getType : bool (* fromRoot *) -> Fspath.t -> Path.local -> typ 24 val getBasic : bool (* fromRoot *) -> Fspath.t -> Path.local -> basic 25 val getBasicWithRess : bool (* fromRoot *) -> Fspath.t -> Path.local -> bress 26 val get : ?archProps:Props.t -> bool (* fromRoot *) -> Fspath.t -> Path.local -> t 27 val set : Fspath.t -> Path.local -> 28 [`Set of Props.basic | `Copy of Path.local | `Update of Props.t] -> 29 Props.x -> unit 30 31 (* IF THIS CHANGES, MAKE SURE TO INCREMENT THE ARCHIVE VERSION NUMBER! *) 32 type stamp251 = 33 InodeStamp of int (* inode number, for Unix systems *) 34 | CtimeStamp of float (* creation time, for windows systems *) 35 36 type stamp = 37 | InodeStamp of int (* inode number, for Unix systems *) 38 | NoStamp 39 | RescanStamp (* stamp indicating file should be rescanned 40 (perhaps because previous transfer failed) *) 41 42 val mstamp : stamp Umarshal.t 43 44 val stamp_to_compat251 : stamp -> stamp251 45 val stamp_of_compat251 : stamp251 -> stamp 46 47 val stamp : _ info -> stamp 48 49 val ressStamp : t -> Osx.ressStamp 50 51 (* Check whether a file is unchanged *) 52 val unchanged : Fspath.t -> Path.local -> t -> (t * bool * bool) 53 54 (****) 55 56 val init : bool -> unit 57 val allowSymlinks : [`True|`False|`Default] Prefs.t 58 val shouldIgnore : string (* error message *) -> bool 59 val ignoreInodeNumbers : bool Prefs.t