123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101(** Note: file-system operations, such as opening or deleting files,
can be found in the {!Path} module. *)openStd(** {2 Types} *)typepath=stringtypeerror=|Already_existsofExn.Backend.t|Not_foundofExn.Backend.t|Permission_deniedofExn.Backend.t|File_too_large|Not_nativeofstring(** Raised by {!Path.native_exn}. *)|Symlink(** Too many symlinks, or symlink when not following. *)typeExn.err+=Eoferrorleterre=Exn.create(Ee)let()=Exn.register_pp(funf->function|Ee->Fmt.stringf"Fs ";beginmatchewith|Already_existse->Fmt.pff"Already_exists %a"Exn.Backend.ppe|Not_founde->Fmt.pff"Not_found %a"Exn.Backend.ppe|Permission_deniede->Fmt.pff"Permission_denied %a"Exn.Backend.ppe|File_too_large->Fmt.pff"File_too_large"|Not_nativem->Fmt.pff"Not_native %S"m|Symlink->Fmt.pff"Symlink"end;true|_->false)(** When to create a new file. *)typecreate=[|`Never(** fail if the named file doesn't exist *)|`If_missingofFile.Unix_perm.t(** create if file doesn't already exist *)|`Or_truncateofFile.Unix_perm.t(** any existing file is truncated to zero length *)|`ExclusiveofFile.Unix_perm.t(** always create; fail if the file already exists *)](** If a new file is created, the given permissions are used for it. *)typedir_ty=[`Dir]type-'adir=([>dir_ty]as'a)r(** Note: use the functions in {!Path} to access directories. *)(** {2 Provider Interface} *)modulePi=structmoduletypePATH=sigvalsplit:path->(path*string)option(** The implementation of {!Eio.Path.split}. *)valjoin:path->path->path(** The implementation of {!Eio.Path.(/)}. *)endmoduletypeDIR=sigtypetvalopen_in:t->sw:Switch.t->follow:bool->path->File.ro_tyrvalopen_out:t->sw:Switch.t->follow:bool->append:bool->create:create->path->File.rw_tyrvalmkdir:t->perm:File.Unix_perm.t->path->unitvalopen_subtree:t->sw:Switch.t->path->[`Close|dir_ty]rvalread_dir:t->path->stringlistvalwith_dir_entries:t->path->((File.Stat.kind*string)Seq.t->'a)->'avalstat:t->follow:bool->string->File.Stat.tvalunlink:t->path->unitvalrmdir:t->path->unitvalrename:t->path->_dir->path->unitvalread_link:t->path->stringvalsymlink:link_to:path->t->path->unitvalchmod:t->follow:bool->perm:File.Unix_perm.t->path->unitvalchown:follow:bool->?uid:int64->?gid:int64->t->path->unitvalpp:tFmt.tvalnative:t->string->stringoptionincludePATHendtype(_,_,_)Resource.pi+=|Dir:('t,(moduleDIRwithtypet='t),[>dir_ty])Resource.piend