package eio
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
Effect-based direct-style IO API for OCaml
Install
dune-project
Dependency
Authors
Maintainers
Sources
eio-1.5.tbz
sha256=7d70d1f5fb2b7190bf1ab28fffeb272da51ffe6d6c9c7c94e0485fabdf3b3fda
sha512=4582ac2fb2f8616b3d8ae9670eb7913a78085899b14044408801b30a34fed6c4d32971ba72eedb0cbc3d82c057610cf81c482090e75e2985330fcde96478ac5e
doc/src/eio/fs.ml.html
Source file fs.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94(** Note: file-system operations, such as opening or deleting files, can be found in the {!Path} module. *) open Std (** {2 Types} *) type path = string type error = | Already_exists of Exn.Backend.t | Not_found of Exn.Backend.t | Permission_denied of Exn.Backend.t | File_too_large | Not_native of string (** Raised by {!Path.native_exn}. *) type Exn.err += E of error let err e = Exn.create (E e) let () = Exn.register_pp (fun f -> function | E e -> Fmt.string f "Fs "; begin match e with | Already_exists e -> Fmt.pf f "Already_exists %a" Exn.Backend.pp e | Not_found e -> Fmt.pf f "Not_found %a" Exn.Backend.pp e | Permission_denied e -> Fmt.pf f "Permission_denied %a" Exn.Backend.pp e | File_too_large -> Fmt.pf f "File_too_large" | Not_native m -> Fmt.pf f "Not_native %S" m end; true | _ -> false ) (** When to create a new file. *) type create = [ | `Never (** fail if the named file doesn't exist *) | `If_missing of File.Unix_perm.t (** create if file doesn't already exist *) | `Or_truncate of File.Unix_perm.t (** any existing file is truncated to zero length *) | `Exclusive of File.Unix_perm.t (** always create; fail if the file already exists *) ] (** If a new file is created, the given permissions are used for it. *) type dir_ty = [`Dir] type -'a dir = ([> dir_ty] as 'a) r (** Note: use the functions in {!Path} to access directories. *) (** {2 Provider Interface} *) module Pi = struct module type PATH = sig val split : path -> (path * string) option (** The implementation of {!Path.split}. *) val join : path -> path -> path (** The implementation of {!Path.(/)}. *) end module type DIR = sig type t val open_in : t -> sw:Switch.t -> path -> File.ro_ty r val open_out : t -> sw:Switch.t -> append:bool -> create:create -> path -> File.rw_ty r val mkdir : t -> perm:File.Unix_perm.t -> path -> unit val open_subtree : t -> sw:Switch.t -> path -> [`Close | dir_ty] r val read_dir : t -> path -> string list val with_dir_entries : t -> path -> ((File.Stat.kind * string) Seq.t -> 'a) -> 'a val stat : t -> follow:bool -> string -> File.Stat.t val unlink : t -> path -> unit val rmdir : t -> path -> unit val rename : t -> path -> _ dir -> path -> unit val read_link : t -> path -> string val symlink : link_to:path -> t -> path -> unit val chmod : t -> follow:bool -> perm:File.Unix_perm.t -> path -> unit val chown : follow:bool -> ?uid:int64 -> ?gid:int64 -> t -> path -> unit val pp : t Fmt.t val native : t -> string -> string option include PATH end type (_, _, _) Resource.pi += | Dir : ('t, (module DIR with type t = 't), [> dir_ty]) Resource.pi end
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>