NAME
TUI::StdDlg::Util - utility functions for Turbo Vision standard dialogs
SYNOPSIS
use TUI::StdDlg::Util qw(
driveValid
fexpand
getCurDir
getHomeDir
isDir
isWild
pathValid
validFileName
);
my $ok = pathValid('/usr/local');
my $abs = fexpand('docs', '/home/user');
DESCRIPTION
TUI::StdDlg::Util provides a collection of helper functions used by Turbo Vision standard dialogs to validate paths, filenames, and directories.
The functions in this module operate on strings and filesystem-related data and do not maintain any internal state. They are intended to support file and directory selection dialogs.
FUNCTIONS
driveValid
my $bool = driveValid($drive);
Returns true if the specified drive identifier is valid.
fexpand
my $path = fexpand($relativePath, $basePath | undef);
Expands a relative path into an absolute path.
If $basePath is provided, the expansion is performed relative to that path. Otherwise, the current directory is used as the base.
getCurDir
getCurDir($dir, $drive);
Retrieves the current directory for the specified drive and stores it in $dir.
getHomeDir
my $bool = getHomeDir($drive, $dir);
Retrieves the home directory associated with the specified drive and stores it in $dir.
Returns true if a home directory could be determined.
isDir
my $bool = isDir($path);
Returns true if the specified path refers to an existing directory.
isWild
my $bool = isWild($string);
Returns true if the specified string contains wildcard characters.
pathValid
my $bool = pathValid($path);
Returns true if the specified path is syntactically valid.
validFileName
my $bool = validFileName($fileName);
Returns true if the specified file name is valid.
SEE ALSO
TUI::StdDlg::FileDialog, TUI::StdDlg::DirListBox, TUI::StdDlg::ChDirDialog
AUTHORS
- Borland International (original Turbo Vision design)
- J. Schneider <brickpool@cpan.org> (Perl implementation and maintenance)
COPYRIGHT AND LICENSE
Copyright (c) 1990-1994, 1997 by Borland International
Copyright (c) 2026 the "AUTHORS" as listed above.
This software is licensed under the MIT license (see the LICENSE file, which is part of the distribution).