123456789101112131415161718192021222324252627282930313233343536373839404142434445(** Defines types used by file-systems. *)(** Tranditional Unix permissions. *)moduleUnix_perm=structtypet=int(** This is the same as {!Unix.file_perm}, but avoids a dependency on [Unix]. *)endtypepath=stringexceptionAlready_existsofpath*exnexceptionNot_foundofpath*exnexceptionPermission_deniedofpath*exn(** When to create a new file. *)typecreate=[|`Never(** fail if the named file doesn't exist *)|`If_missingofUnix_perm.t(** create if file doesn't already exist *)|`Or_truncateofUnix_perm.t(** any existing file is truncated to zero length *)|`ExclusiveofUnix_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: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