package fat-filesystem

  1. Overview
  2. Docs
Pure OCaml implementation of the FAT filesystem

Install

dune-project
 Dependency

Authors

Maintainers

Sources

fat-filesystem-0.15.1.tbz
sha256=6211952a8dd008ab7d02cdb3a6545a65a5ff8047e71dd8ce48a09fb500fe10a3
sha512=cddfa7e43dbd6ecab23113b3136c91f60c3890efc773603e6a3c3dd531c19e437a8e10b0923e1ce7fbc1d2ca77e6f098040e94678f79f04cec98c56ecef4b5cd

doc/fat-filesystem/Fat_update/index.html

Module Fat_updateSource

Sourcetype data =
  1. | String of string
  2. | Cstruct of Cstruct.t
    (*

    payload of a buffer update

    *)
Sourcetype t = {
  1. offset : int64;
  2. data : data;
}

an update to a block of data (which may be in memory or on disk or somewhere else)

Sourceval to_string : t -> string
Sourceval from_string : int64 -> string -> t
Sourceval from_cstruct : int64 -> Cstruct.t -> t
Sourceval shift : int64 -> t -> t
Sourceval total_length : t -> int64

total_length x returns the minimum size of the block of data needed to apply this update. If the block is currently smaller then it will need to be enlarged

Sourceval apply : Cstruct.t -> t -> unit

apply buf update updates buf with update

Sourceval clip : t -> int64 -> int -> t

clip x offset length returns the fraction of the update between offset and offset+length in bytes

Sourceval is_empty : t -> bool
Sourceval split : t -> int -> t list

split x sector_size returns x as a sequence of consecutive updates, each of which corresponds to a region of length sector_size. Note empty updates are omitted.

Sourceval map : t list -> int list -> int -> t list

map xs offsets takes a sequence of virtual sector updates (eg within the virtual address space of a file) and a sequence of physical offsets (eg the location of physical sectors on disk) and returns a sequence of physical sector updates.

OCaml

Innovation. Community. Security.