Module VirtfsSource

Virtfs provides primitives for describing paths in a file system in an abstract (platform-independent) and relatively portable manner, while allowing virtual file systems to be easily mounted to facilitate the writing of unit tests in programmes that abstract effects and rely on the file system.

Abstraction over Path

Describes resolvable, portable, and platform-independent file paths.

Sourcemodule Path : sig ... end

A path Path.t is a lax representation of a file path in an abstract file system. It can be used to describe, abstractly, operations on file paths and to mock file systems.

Virtual File System

Implementation of an in-memory file system based on Path, which abstracts file contents and metadata. The module also exposes Tree.Simple, which is an opinionated implementation of a very limited version of a system that mimics (somewhat) the behaviour of Unix file systems.

Sourcemodule Tree : sig ... end

Describes a file tree containing files or directories (a directory being a file tree). Unlike Path, which can be used in an application to abstract paths, Tree is mainly used to mount virtual file systems, which are particularly useful for writing unit tests.