123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263(** Defines types used by file-systems. *)(** Tranditional Unix permissions. *)moduleUnix_perm=File.Unix_perm[@@deprecated"Moved to File.Unix_perm"]typepath=stringtypeerror=|Already_existsofExn.Backend.t|Not_foundofExn.Backend.t|Permission_deniedofExn.Backend.t|File_too_largetypeExn.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"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. *)(** Note: use the functions in {!Path} to access directories. *)classvirtualdir=object(_:#Generic.t)methodprobe_=Nonemethodvirtualopen_in:sw:Switch.t->path-><File.ro;Flow.close>methodvirtualopen_out:sw:Switch.t->append:bool->create:create->path-><File.rw;Flow.close>methodvirtualmkdir:perm:File.Unix_perm.t->path->unitmethodvirtualopen_dir:sw:Switch.t->path->dir_with_closemethodvirtualread_dir:path->stringlistmethodvirtualunlink:path->unitmethodvirtualrmdir:path->unitmethodvirtualrename:path->dir->path->unitmethodvirtualpp:Format.formatter->unitendandvirtualdir_with_close=object(* This dummy class avoids an "Error: The type < .. > is not an object type" error from the compiler. *)inheritdirmethodvirtualclose:unitend