Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
include Protocol_9p_client.S
A thread which wakes up when the connection to the server has been broken
Disconnect from the 9P server, but leave the underlying FLOW connected.
val create :
t ->
string list ->
string ->
Protocol_9p_types.FileMode.t ->
unit Protocol_9p_error.t Lwt.t
create t path name perm
creates a new empty file name
inside path
with * the given permissions.
val write :
t ->
string list ->
int64 ->
Cstruct.t ->
unit Protocol_9p_error.t Lwt.t
write t path offset buf
writes buf
to the file at path
at offset offset
val read :
t ->
string list ->
int64 ->
int32 ->
Cstruct.t list Protocol_9p_error.t Lwt.t
read t path offset count
returns a list of buffers containing count
bytes from offset offset
in the file given by path
val mkdir :
t ->
string list ->
string ->
Protocol_9p_types.FileMode.t ->
unit Protocol_9p_error.t Lwt.t
mkdir t path name perm
creates a new directory name
inside path
with * the given permissions.
val remove : t -> string list -> unit Protocol_9p_error.t Lwt.t
remove t path
removes a file or directory from the filesystem.
val readdir :
t ->
string list ->
Protocol_9p_types.Stat.t list Protocol_9p_error.t Lwt.t
Return the contents of a named directory.
val stat :
t ->
string list ->
Protocol_9p_types.Stat.t Protocol_9p_error.t Lwt.t
Return information about a named directory or named file.
module KV_RO : Mirage_kv_lwt.RO with type t = t
module LowLevel : sig ... end
The functions in this module are mapped directly onto individual 9P RPCs. The client must carefully respect the rules on managing fids and stay within the message size limits.
val walk_from_root :
t ->
Protocol_9p_types.Fid.t ->
string list ->
Protocol_9p_response.Walk.t Protocol_9p_error.t Lwt.t
walk_from_root t
is LowLevel.walk t root
, where root
is the internal Fid representing the root directory (which is not exposed by the API).
val with_fid :
t ->
(Protocol_9p_types.Fid.t -> 'a Protocol_9p_error.t Lwt.t) ->
'a Protocol_9p_error.t Lwt.t
with_fid t fn
is the result of running fn x
with a fresh Fid x
, which is returned to the free pool when the thread finishes.
val connect :
string ->
string ->
?msize:int32 ->
?username:string ->
?aname:string ->
?max_fids:int32 ->
unit ->
t Protocol_9p_error.t Lwt.t