package tinyfiledialogs

  1. Overview
  2. Docs

TinyFileDialogs

This library provides OCaml bindings to the TinyFileDialogs C library.

API documentation

Installation

opam install tinyfiledialogs

Usage

Open Tinyfiledialogs and call functions like:

  • input_box
  • message_box
  • save_file_dialog
  • open_file_dialog
  • select_folder_dialog
  • color_chooser
  • beep
  • notify_popup

You can also configure global variables:

  • tinyfd_verbose
  • tinyfd_silent
  • tinyfd_allowCursesDialogs
  • tinyfd_forceConsole

Example

open Tinyfiledialogs

let () =
  match input_box ~title:"Name" ~message:"Enter your name:" ~default_input:"" with
  | None -> exit 0
  | Some name -> print_endline ("Hello " ^ name ^ "!")