Home › Uncategorized tcllib
fileutil::paths
Manage search path pools
literal type exactly as shown
argument replace with your value
?optional? may be omitted
Synopsis#
package require Tcl 8.5 9
package require fileutil::paths ?1.1?
::fileutil::paths poolName
poolName method ?arg arg ...?
poolName add path
poolName clear
poolName paths
poolName remove path
Description#
Provides a snit class whose instances manage a pool of (search) paths.
API#
The main command provides construction of search path pools:
::fileutil::pathspoolName#-
Creates a new, empty pool of search paths with an associated global Tcl command whose name is poolName. It may be used to invoke various operations on the pool. It has the following general form:
poolNamemethod?arg arg ...?#-
methodand arguments determine the exact behavior of the command.
If poolName is specified as
%AUTO%a unique name will be generated by the package itself. The result of the command is the fully-qualified name of the instance command.The following commands are possible for pool objects:
- poolName
addpath -
Adds the path to the pool. Nothing is done if the path is already known to the pool. The result of the command is the empty string.
- poolName
clear -
Clears the entire pool. In other words, removes all paths from it. The result of the command is the empty string.
- poolName
paths -
Returns the list of all paths known to the pool, in the order they were added.
- poolName
removepath -
Removes the path from the pool, if it is known to the pool. Unknown paths are ignored without error. The result of the command is the empty string.
Bugs, ideas, feedback#
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category fileutil of the Tcllib Trackers [http://core.tcl.tk/tcllib/reportlist]. Please also report any ideas for enhancements you may have for either package and/or documentation.
When proposing code changes, please provide unified diffs, i.e the output of diff -u.
Note further that attachments are strongly preferred over inlined patches. Attachments can be made by going to the Edit form of the ticket immediately after its creation, and then using the left-most button in the secondary navigation bar.