package current
Pipeline language for keeping things up-to-date
Install
Dune Dependency
Authors
Maintainers
Sources
current-0.6.2.tbz
sha256=ed312cab4ce8d13b9547ee2f935a6954f1d5211de1c22d44d85baaeb9f5fca9d
sha512=c2981a2c7f05bd6f235662b74ee3a679cc395be3d2cca808fac3dc562d6307e8bfe05efff40f42fa4738443cc2fe13929bab9d815c43d741950e5e0e1e6da7a6
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)"
>