A fileSetExpression is a Misp expression designating a file set. FileCmds registers the following primitives with Misp, to aid in the construction of file sets.
(filesMatching fileNamePattern:ROPE) => FileSet
designates the files whose names match the pattern. A number sign (#) is just like an asterisk, except that it won't match directory delimiters. If a number sign is used, the pattern should be in the IFS-style, rather than the slashy style.
(versionMapFilesMatching fileNamePatter:ROPE [WhichMap]) => FileSet
designates the files in the indicated version map whose names match the pattern. The WhichMap should be either $Source or $Symbols, and defaults to $Source.
(versionMapFilesCreated from:Time to:Time [WhichMap]) => FileSet
designates the files in the indicated version map whose create date lies in the given range. The WhichMap should be either $Source or $Symbols, and defaults to $Source.
(archive date:ROPE) => FileSet
designates the files listed in the archive message of the given date. There must be a Walnut message viewer on that message.
(online date:ROPE) => FileSet
like archive, except that if the message is a retrieve response, this designates the places the files were retrieved to (this is potentially distinct from where they were archived from).
(archived fileNamePattern:ROPE) => FileSet
designates the files, backed up by the archivist, whose names match the pattern.
(dfContentsq DFOption .. DFOption) => FileSet
like dfContents, except that the arguments are not evaluated.
(dfContents DFOption .. DFOption) => FileSet
designates the results of the analyses of the indicated DF files. Valid values for DFOptions are:
$source, $derived, $sourceAndDerived
these specify part of the filter. Default is sourceAndDerived.
$public, $private, $publicAndPrivate
these specify another part of the filter. Default is publicAndPrivate.
$defining, $imported, $definingAndImported
these specify yet another part of the filter. N.B.: Default is defining.
a UsingList
There can be no more than one using list given. The using list may be omitted.
$remote, $local
these specify whether to use the local files (the files in the current working directory whose short names are in the DF files) or the remote files (the ones specified in the DF files). Default is remote.
"DFFileNamePattern"
this specifies some DF files to use. These patterns differ from the FS norm in that the version part defaults to !H instead of !*. There can be more than one pattern..
a FileSet containing only DF files
this also specifies some DF files to use.
(using fileName1 ... fileNameN:ROPE) => UsingList
(fsFromFile fileName1:ROPE ... fileNameN:ROPE) => FileSet
each named file should contain text: a list (space delimited) of file names.
(fsFromROPE fileList1:ROPE .. fileListN:ROPE) => FileSet
each argument should be a list (space delimited) of file names.
(fsUnion fileSetExpression1 ... fileSetExpressionN) => FileSet
this constructs the union of the given file sets.
(fsIntersection fileSetExpression1 ... fileSetExpressionN) => FileSet
this constructs the intersection of the given file sets.
(fsDiff fileSetExpression1 ... fileSetExpressionN) => FileSet
this constructs the set difference fileSetExpression1 - fileSetExpression2 - ... fileSetExpressionN.
(fsSDiff fileSetExpression1 ... fileSetExpressionN) => FileSet
this constructs the symmetric difference fileSetExpression1 XOR fileSetExpression2 XOR ... fileSetExpressionN.
(fsRealify fileSetExpression) => FileSet
constructs a new file set by mapping all the files on pseudo-servers to ones on real servers (by simply substituting server names).
(fsFilter pred fileSetExpression) => FileSet
this constructs the subset of fileSetExpression that satisfies pred. The function pred gets to examine each file note in the file set in turn, and return a Misp truth value saying whether it passes.
(enumFileSet fileSetExpression consumer) => FileSet
this calls the consumer once for each file in the file set.
(fnID fn:FileNote) => (name:ROPE created:TIME)
this extracts the ID of a file note.
(fnName fn:FileNote) => ROPE
this extracts the name of the file being noted.
(fnCreated fn:FileNote) => Time
this extracts the create date of the file being noted.
(fnRead fn:FileNote) => Time
this extracts the latest-read-time of the file being noted.
(consIDS idsPart ... idsPart) => IndentificationScheme
Makes an IndentificationScheme. Each idsPart must evaluate to one of: $withServer, $withoutServer, $withDirectory, $withoutDirectory, $withVersion, $withoutVersion, $withCreate, $withoutCreate, $askFS. The defaults are $withDirectory, $withVersion, $withoutCreate.
(consIDSq idsPart ... idsPart) => IndentificationScheme
Like consIDS, except that its arguments are not first evaluated.
option is one of:
-withoutServer
this says that the server part of file names is not significant when identifying files.
-withServer
this says that the server part of file names is part of what identifies files. This is the default behavior.
-withoutDirectory
this says that the server and directory parts of file names are not significant when identifying files.
-withDirectory
this says that the directory part of file names is part of what identifies files. This is the default behavior.
-withoutVersion
this says that the version part of file names is not significant when identifying files.
-withVersion
this says that the version part of file names is significant when identifying files. This is the default behavior.
-withoutCreate
this says that the create date is not significant when identifying files. This is the default behavior.
-withCreate
this says that the create date is significant when identifying files.
-askFS
this says that files are identified by what FS returns as their fullFName and create date after some kind of lookup.
-touchy
this says that if there is any problem evaluating the fileSetExpression, then proceed no further after finishing evaluating the fileSetExpression. This is the default behavior.
-tough
this says to push on as doggedly as possible.
perFilePattern is a ROPE literal that will be subjected to the following substitutions:
<fileName>
gets replaced with the name of the file
<created>
gets replaced with the create date of the file. If the perFilePattern contains <created>, but no create date is available for the file, a warning message is printed, and the command does nothing after enumerating the file set.
<primaryVolume>
gets replaced with the primary volume on which the file was archived (empty string if file not known to be archived)
<backupVolume>
gets replaced with the backup volume on which the file was archived (empty string if file not known to be archived)