package fat-filesystem

  1. Overview
  2. Docs
type datetime = {
  1. year : int;
  2. month : int;
  3. day : int;
  4. hours : int;
  5. mins : int;
  6. secs : int;
  7. ms : int;
}
val epoch : datetime
type lfn = {
  1. lfn_deleted : bool;
  2. lfn_last : bool;
  3. lfn_seq : int;
  4. lfn_checksum : int;
  5. lfn_utf16_name : string;
}
type dos = {
  1. filename : string;
  2. ext : string;
  3. deleted : bool;
  4. read_only : bool;
  5. hidden : bool;
  6. system : bool;
  7. volume : bool;
  8. subdir : bool;
  9. archive : bool;
  10. create : datetime;
  11. access : datetime;
  12. modify : datetime;
  13. start_cluster : int;
  14. file_size : int32;
}
type single_entry =
  1. | Dos of dos
  2. | Lfn of lfn
  3. | End
type r = {
  1. utf_filename : string;
  2. dos : int * dos;
  3. lfns : (int * lfn) list;
}
val fake_root_entry : r
val file_size_of : r -> int32
val deleted : r -> bool
val filename_of : r -> string
val to_single_entries : r -> single_entry list
val dos_name_of_filename : string -> string * string
val compute_checksum : dos -> int
val make : ?read_only:bool -> ?system:bool -> ?subdir:bool -> string -> r
val to_string : r -> string
val to_pretty_string : r -> string
val int_to_hms : int -> int * int * int
val hms_to_int : (int * int * int) -> int
val int_of_time : datetime -> int
val time_of_int : int -> int -> int -> datetime
val int_of_date : datetime -> int
val unmarshal : Cstruct.t -> single_entry
val marshal : Cstruct.t -> single_entry -> unit
val sizeof : int
val blocks : Cstruct.t -> (int * Cstruct.t) list
val fold : ('a -> int -> r -> 'a) -> 'a -> Cstruct.t -> 'a
val list : Cstruct.t -> r list
val next : Cstruct.t -> int option
val add : Cstruct.t -> r -> Update.t list
val name_match : string -> r -> bool
val find : string -> r list -> r option
val remove : Cstruct.t -> string -> Update.t list
val modify : Cstruct.t -> string -> int32 -> int -> Update.t list
OCaml

Innovation. Community. Security.