package fat-filesystem

  1. Overview
  2. Docs
type t = {
  1. oem_name : string;
  2. bytes_per_sector : int;
  3. sectors_per_cluster : int;
  4. reserved_sectors : int;
  5. number_of_fats : int;
  6. number_of_root_dir_entries : int;
  7. total_sectors : int32;
  8. sectors_per_fat : int;
  9. hidden_preceeding_sectors : int32;
}
val make : int64 -> t

make size creates a boot sector able to accommodate a disk of size size bytes

val sizeof : int
val marshal : Cstruct.t -> t -> unit
val unmarshal : Cstruct.t -> (t, string) Result.result
val debug_print : t -> unit
val initial_cluster : t -> int

Return the sector number of the first cluster

val sectors_of_cluster : t -> int -> int list

Return a list of sectors corresponding to cluster n

val clusters : t -> int

Return the number of clusters

val detect_format : t -> (Fat_format.t, string) Result.result
val fat_id : int

The FAT ID which will be written in both the boot sector and the 0th cluster of the FAT

val sectors_of_fat : t -> int list
val sectors_of_root_dir : t -> int list
OCaml

Innovation. Community. Security.