package current
Pipeline language for keeping things up-to-date
Install
Dune Dependency
Authors
Maintainers
Sources
current-v0.5.tbz
sha256=f8c884318a46a568d965c7e8bac00dfe2339efac04ca6f0cbabef916d8b917ca
sha512=e0633239a7d02cdde6264db96c39ed7e3d1adf3a7f09bb25ad002d388f203b561e8c808daee90539bc0ee15c547d2ab4bef1789dcc9c22ed00b151bad0083f64
doc/src/current.fs/current_fs.ml.html
Source file current_fs.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
open Current.Syntax let src = Logs.Src.create "current.fs" ~doc:"OCurrent filesystem plugin" module Log = (val Logs.src_log src : Logs.LOG) let save path value = Current.component "save" |> let> path = path and> value = value in Current_incr.const ( match Bos.OS.File.read path with | Ok old when old = value -> Log.info (fun f -> f "No change for %a" Fpath.pp path); Ok (), None | Error _ as e when Bos.OS.File.exists path = Ok true -> e, None | _ -> (* Old contents differ, or file doesn't exist. *) match Bos.OS.File.write path value with | Ok () -> Log.info (fun f -> f "Updated %a" Fpath.pp path); Ok (), None | Error _ as e -> e, None )
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>