package fat-filesystem

  1. Overview
  2. Docs
type t =
  1. | Free
  2. | Used of int
    (*

    points to the next in the chain

    *)
  3. | End
    (*

    end of a chain

    *)
  4. | Bad
    (*

    bad sector or illegal FAT entry

    *)
val to_string : t -> string
type fat = Cstruct.t

a whole File Allocation Table

val make : Fat_boot_sector.t -> Fat_format.t -> Cstruct.t

make boot_sector format creates an empty FAT given the parameters in boot_sector and the format

val find_free_from : Fat_boot_sector.t -> Fat_format.t -> fat -> int -> int option

find_free_from boot format fat start returns an unallocated cluster after start

val initial : int

first valid entry

val unmarshal : Fat_format.t -> int -> fat -> t

unmarshal format n fat return the nth fat entry in format

val marshal : Fat_format.t -> int -> fat -> t -> unit

marhsal format n fat v update the nth fat entry in format with v

module Chain : sig ... end
OCaml

Innovation. Community. Security.