Version: 4.1.4.1
3.7 Nodes
(fs-make-directory root path) → void? |
root : fs-root? |
path : path-string? |
Creates a new directory at path below root.
(fs-make-file root path) → void? |
root : fs-root? |
path : path-string? |
Creates a new empty file at path below root.
(fs-copy-node | | src-root | | | | | | | src-path | | | | | | | tgt-root | | | | | | | tgt-path) | | → | | void? |
|
src-root : fs-root? |
src-path : path-string? |
tgt-root : fs-root? |
tgt-path : path-string? |
Copies the file at src-path below src-root to
tgt-path below tgt-root. Records copy history for
the new file.
(fs-rev-link-node src-root tgt-root path) → void? |
src-root : fs-root? |
tgt-root : fs-root? |
path : path-string? |
Links the file at path below src-root to the same
path below tgt-root. Does not record copy history for the
file.
(fs-merge-nodes | | src-root | | | | | | | src-path | | | | | | | tgt-root | | | | | | | tgt-path | | | | | | | ancestor-root | | | | | | | ancestor-path) | | → | | void? |
|
src-root : fs-root? |
src-path : path-string? |
tgt-root : fs-root? |
tgt-path : path-string? |
ancestor-root : fs-root? |
ancestor-path : path-string? |
Merges changes from the ancestor at ancestor-path below
ancestor-root the source at src-path below
scr-root and between the ancestor and the target at
tgt-path below tgt-root into the target.
(fs-delete-node root path) → void? |
root : fs-root? |
path : path-string? |
Deletes the node at path below root.
C enumeration type classifying the node at a given path. The
possible values are 'none, 'file, 'dir
and 'unknown.
(fs-node-kind root path) → (one-of/c 'none 'file 'dir 'unknown) |
root : fs-root? |
path : path-string? |
Classifies the node at path below root. Returns
a symbol describing the type of node or 'none to indicate
that no node exists at the given path.
(fs-node-directory? root path) → boolean? | root : fs-root? | path : path-string? |
|
(fs-node-file? root path) → boolean? | root : fs-root? | path : path-string? |
|
Checks whether a node at path below root exists
and is a directory or file respectively.
(fs-node-created-rev root path) |
→ (or/c exact-nonnegative-integer? #f) |
root : fs-root? |
path : path-string? |
Retrieves the revision in which the node at path below
root was created.
Returns #f for nodes that have not been committed, yet.
(fs-node-created-path root path) → path? |
root : fs-root? |
path : path-string? |
Retrieves the path at which the node at path below
root was originally created.
(fs-node-copied-from root path) |
| → | | (or/c exact-nonnegative-integer? #f) | (or/c path? #f) |
|
|
root : fs-root? |
path : path-string? |
If the node at path below root was copied from
some other node, this procedure returns the revision and path it was
copied from. Otherwise it returns two #f values.
(fs-node-closest-copy root path) |
| → | | (or/c fs-root? #f) | | (or/c path? #f) |
|
|
root : fs-root? |
path : path-string? |
Retrieves the revision root and path of the destination of the most
recent copy event that caused path to exist where it does
in root. Returns two #f values if no such copy
exists.
(fs-directory-list root path) → (listof path?) |
root : fs-root? |
path : path-string? |
Retrieves a list of entries in the directory at path
below root. The returned paths are relative to their
containing directory.
(fs-file-length root path) → exact-nonnegative-integer? |
root : fs-root? |
path : path-string? |
Retrieves the length in bytes of the file located at path
below root.
(fs-file-contents-changed? | | src-root | | | | | | | src-path | | | | | | | tgt-root | | | | | | | tgt-path) | | → | | boolean? |
|
src-root : fs-root? |
src-path : path-string? |
tgt-root : fs-root? |
tgt-path : path-string? |
Checks whether the contents of the source at src-path below
src-root differ from those of the target at tgt-path
below tgt-root.
(fs-node-prop root path prop-name) → (or/c bytes? #f) | root : fs-root? | path : path-string? | prop-name : symbol? |
|
(set-fs-node-prop! root path prop-name value) → void? | root : fs-root? | path : path-string? | prop-name : symbol? | value : (or/c bytes? #f) |
|
(set! (fs-node-prop root path prop-name) value) |
|
Retrieves or sets a node property as a binary string.
A non-existent property is represented by the value #f.
When a property is set to #f, it is deleted.
(fs-list-node-props root path) → (listof symbol?) |
root : fs-root? |
path : path-string? |
Retrieves a list of all properties set on a node.