package b0

  1. Overview
  2. Docs
Software construction and deployment kit

Install

dune-project
 Dependency

Authors

Maintainers

Sources

b0-0.0.6.tbz
sha512=e9aa779e66c08fc763019f16d4706f465d16c05d6400b58fbd0313317ef33ddea51952e2b058db28e65f7ddb7012f328c8bf02d8f1da17bb543348541a2587f0

doc/b0.memo/B0_zero/Trash/index.html

Module B0_zero.TrashSource

Delete file hierarchies.

Deleting file hierarchies may be slow. This clears a given path by moving it to a trash directory which can be deleted at the end of the build asynchronously.

Sourcetype t

The type for trashes.

Sourceval make : B0_std.Fpath.t -> t

make dir is a trash using directory dir for data storage. dir may not exist.

Sourceval dir : t -> B0_std.Fpath.t

dir t is the trash's directory (may not exist)

Sourceval trash : t -> B0_std.Fpath.t -> (unit, string) result

trash t p trashes path p in dir t. If p does not exist this has no effect. Note that p needs to be on the same device as dir t and that the latter is created if needed.

Sourceval delete : block:bool -> t -> (unit, string) result

delete ~block t deletes t's trash directory and its content. If block is true the operation is synchronous and blocks until the trash is effectively deleted; if false the operation is spawn as a separate process.

Note. On Windows block:false relies on cmd.exe being available.