package mfat

  1. Overview
  2. Docs
An implementation of FAT32 in OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

mfat-0.0.1.beta1.tbz
sha256=a3dcb21bb74a9b17bb21bbd6b8f2e56d687d85ff732841c3ddb425a9be9cf1e3
sha512=a70ce27dc2e81c0a7515e64fdbdd695f9ef57f35a213a0ad6ceaed3fbe88439087100d2b3f2bc256228c8e169c28c88a9f6d47355d93856bb49bdb86ff745d1d

doc/mfat.bos/Mfat_bos/Make/File/index.html

Module Make.FileSource

Sourceval exists : blk Mfat.t -> Fpath.t -> (bool, 'err) result

exists t file is true if file is a regular file in the file system and false otherwise.

Sourceval must_exist : blk Mfat.t -> Fpath.t -> (Fpath.t, [> `Msg of string ]) result

must_exist t file is Ok file if file is a regular file in the file system and an error otherwise.

Sourceval delete : blk Mfat.t -> ?must_exist:bool -> Fpath.t -> (unit, [> `Msg of string ]) result

delete t ~must_exist file deletes file file. If must_exist is true (defaults to false) an error is returned if file doesn't exist.

Sourceval read : blk Mfat.t -> Fpath.t -> (string, [> `Msg of string ]) result

read t file is file's content as a string.

Sourceval read_lines : blk Mfat.t -> Fpath.t -> (string list, [> `Msg of string ]) result

read_lines t file is file's content, split at each '\n' character.

Sourceval fold_lines : (string -> 'a -> 'a) -> 'a -> blk Mfat.t -> Fpath.t -> ('a, [> `Msg of string ]) result

fold_lines f acc t file is like List.fold_left f acc (read_lines t file).

Sourceval write : blk Mfat.t -> Fpath.t -> string -> (unit, [> `Msg of string ]) result

write t file content outputs content to file.

Sourceval write_lines : blk Mfat.t -> Fpath.t -> string list -> (unit, [> `Msg of string ]) result

write_lines t file lines writes lines joined by "\n" to file.