package devkit

  1. Overview
  2. Docs
Development kit - general purpose library

Install

Dune Dependency

Authors

Maintainers

Sources

devkit-1.3.tbz
sha256=dae965685dceed47ad8e9844f12fe707dafdf2c3bdd46d0431d5b4d1e7754b23
sha512=b94ade804d751db87434042bbaa821fa8e82e233820a76806f910e2da040094b137e88a3579911a1626930912622b064c776ddbcb6991fb7111021ebf6553fdc

doc/devkit.core/Devkit_core/Files/index.html

Module Devkit_core.FilesSource

File system

Sourceval enum_dir : Unix.dir_handle -> string Enum.t
Sourceval with_readdir : string -> (Unix.dir_handle -> 'a) -> 'a
Sourceval iter_names : string -> (Unix.file_descr -> string -> string -> unit) -> unit

f fd path rel gets invoked for each file under dirname where fd is a read-only Unix.file_descr, path is full path and rel - path relative to dirname

Sourceval iter_names_q : string -> (string -> string -> unit) -> unit

iter_names_q dirname (fun [path] [rel] -> ...)

Sourceval iter_files : string -> (string -> in_channel -> unit) -> unit

iter_files dirname (fun [path] [ic] -> ...)

Sourceval open_out_append_bin : string -> out_channel
Sourceval open_out_append_text : string -> out_channel
Sourceval save_as : string -> ?mode:Unix.file_perm -> (out_channel -> unit) -> unit

save_as filename ?mode f is similar to Control.with_open_file_bin except that writing is done to a temporary file that will be renamed to filename after f has succesfully terminated. Therefore this guarantee that either filename will not be modified or will contain whatever f was writing to it as a side-effect.

FIXME windows

OCaml

Innovation. Community. Security.