12345678910111213141516171819202122232425openCurrent.Syntaxletsrc=Logs.Src.create"current.fs"~doc:"OCurrent filesystem plugin"moduleLog=(valLogs.src_logsrc:Logs.LOG)letsavepathvalue=Current.component"save"|>let>path=pathand>value=valueinCurrent_incr.const(matchBos.OS.File.readpathwith|Okoldwhenold=value->Log.info(funf->f"No change for %a"Fpath.pppath);Ok(),None|Error_asewhenBos.OS.File.existspath=Oktrue->e,None|_->(* Old contents differ, or file doesn't exist. *)matchBos.OS.File.writepathvaluewith|Ok()->Log.info(funf->f"Updated %a"Fpath.pppath);Ok(),None|Error_ase->e,None)