Fat.Makeval pp_error : error Fmt.tpp_error is the pretty-printer for errors.
type write_error = [ | error |
| `Is_a_directory |
| `No_directory_entry |
| `Not_a_directory |
| `File_already_exists |
| `No_directory_entry |
| `No_space |
| `Directory_not_empty |
| `Block_write of B.write_error |
| `Exn of exn |
]val pp_write_error : write_error Fmt.tpp_write_error is the pretty-printer for write errors.
val disconnect : t -> unit Lwt.tDisconnect from the device. While this might take some time to complete, it can never result in an error.
val connect : B.t -> t Lwt.tval format : B.t -> int64 -> ( t, write_error ) Stdlib.result Lwt.tread t key offset length reads up to length bytes from the value associated with key. If less data is returned than requested, this indicates the end of the value.
val create : t -> string -> ( unit, write_error ) Stdlib.result Lwt.tcreate t path creates an empty file at path. If path contains directories that do not yet exist, create will attempt to create them.
val mkdir : t -> string -> ( unit, write_error ) Stdlib.result Lwt.tmkdir t path creates an empty directory at path. If path contains intermediate directories that do not yet exist, mkdir will create them. If a directory already exists at path, mkdir returns `Ok () and takes no action.
val destroy : t -> string -> ( unit, write_error ) Stdlib.result Lwt.tdestroy t path removes a path (which may be a file or an empty directory) on filesystem t.
stat t path returns information about file or directory at path.
listdir t path returns the names of files and subdirectories within the directory path.
val write :
t ->
string ->
int ->
Cstruct.t ->
( unit, write_error ) Stdlib.result Lwt.twrite t path offset data writes data at offset in file path on filesystem t.
If path contains directories that do not exist, write will attempt to create them. If path already exists, write will overwrite existing information starting at off.