ocaml-core / base / core / extended / lib / extended_common.mli

The branch 'bash' does not exist.
(** Pervasive functions. *)

val run_main : (unit -> unit) -> _

(** [write_wrap ~atomic ~f fname] Runs [f] on an [out_channel]. If [mode] is
    [`Atomic] or [`Atomic_update] is set all the changes will be written to a
    temporary file which will then be moved over [fname] otherwise we are
    writing straight to [fname].

    Values for [mode]:
    - [`Clobber]: clear the file on opening (this is the default value)
    - [`Append]: append to the file
    - [`Atomic]: replace the file atomically when we are done writing it
    - [`Atomic_update]: replace the file atomically when we are done writing it
    iff its content has been modified.
*)
val write_wrap :
 ?mode:[`Clobber|`Append|`Atomic|`Atomic_update]
 -> f:(out_channel -> 'a)
 -> string
 -> 'a
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.