Module libpijul::fs[][src]

Expand description

Manipulating the internal representation of files and directories tracked by Pijul (i.e. adding files, removing files, getting file names…).

Pijul tracks files in two different ways: one is the graph, where changes are applied. The other one is the working copy, where some filesystem changes are not yet recorded. The purpose of this double representation is to be able to compare a file from the graph with its version in the working copy, even if its name has changed in the working copy.

The functions of this module work at exactly one of these two levels. Changing the graph is done by recording and applying a change, and changing the working copy is done either by some of the functions in this module, or by outputting the graph to the working copy (using the output module).

Structs

An iterator over the basenames of an “inode key” in the graph.

An iterator over the children (i.e. a single level down) of an inode key in the graph.

An iterator over the descendants of an inode key in the graph.

An iterator over the children (i.e. one level down) of an inode in the working copy.

An iterator over all the paths in the working copy.

Enums

Functions

Find the inode corresponding to that path, if it exists.

Find the filename leading from the root to ~inode~.

Test whether inode is the inode of a directory (as opposed to a file).

Returns whether a path is registered in the working copy.

List all the basenames of an “inode key” in the graph (more than one name means a conflict).

Returns a list of files under the given key. The root key is pristine::Vertex::ROOT.

Returns a list of files under the given key. The root key is pristine::Vertex::ROOT.

Traverse the paths in the graph to a key. Warning: there might be a number of paths exponential in the number of conflicts.

Returns an iterator over all the files in the working copy.

Move an inode (file or directory) from origin to destination, (in the working copy).

Removes a file from the repository.

Returns a list of the children of an inode, in the working copy.