Tcl Library Source Code

EuroTcl/OpenACS 11 - 12 JULY 2024, VIENNA

[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]


fileutil - Procedures implementing some file utilities

Table Of Contents


package require Tcl 8.5 9
package require fileutil ?1.16.2?

::fileutil::lexnormalize path
::fileutil::fullnormalize path
::fileutil::test path codes ?msgvar? ?label?
::fileutil::cat (?options? file)...
::fileutil::writeFile ?options? file data
::fileutil::appendToFile ?options? file data
::fileutil::insertIntoFile ?options? file at data
::fileutil::removeFromFile ?options? file at n
::fileutil::replaceInFile ?options? file at n data
::fileutil::updateInPlace ?options? file cmd
::fileutil::fileType filename
::fileutil::find ?basedir ?filtercmd??
::fileutil::findByPattern basedir ?-regexp|-glob? ?--? patterns
::fileutil::foreachLine var filename cmd
::fileutil::grep pattern ?files?
::fileutil::install ?-m mode? source destination
::fileutil::stripN path n
::fileutil::stripPwd path
::fileutil::stripPath prefix path
::fileutil::jail jail path
::fileutil::touch ?-a? ?-c? ?-m? ?-r ref_file? ?-t time? filename ?...?
::fileutil::tempdir path
::fileutil::tempfile ?prefix?
::fileutil::maketempdir ?-prefix str? ?-suffix str? ?-dir str?
::fileutil::relative base dst
::fileutil::relativeUrl base dst


This package provides implementations of standard unix utilities.

Warnings and Incompatibilities

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. 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.


cat, file utilities, grep, temp file, test, touch, type


Programming tools