NAME
TUI::StdDlg::Dos - DOS-style directory search structures and functions
SYNOPSIS
use TUI::StdDlg::Dos;
my $blk = ffblk->new;
if ( _dos_findfirst('*.*', 0, $blk) == 0 ) {
do {
print $blk->ff_name, "\n";
} while ( _dos_findnext($blk) == 0 );
}
DESCRIPTION
TUI::StdDlg::Dos provides low-level data structures and helper functions used by the standard dialog subsystem to perform directory searches in a DOS-compatible manner.
The module defines record-style structures representing directory entries and exposes search functions that iterate over matching filesystem objects. These facilities are used internally by directory and file selection dialogs.
This module does not define any objects derived from TObject.
STRUCTURES
ffblk
Represents a directory search record compatible with the traditional DOS ffblk structure.
The structure contains the following fields:
- ff_name
-
Name of the matched file or directory (Str).
- ff_fsize
-
Size of the file in bytes (Int).
- ff_attrib
-
Attribute flags of the matched entry (Int).
- ff_ftime
-
Time of last modification (Int).
- ff_fdate
-
Date of last modification (Int).
find_t
Represents a directory search record compatible with the Microsoft C runtime find_t structure.
The structure contains the following fields:
- name
-
Name of the matched file or directory (Str).
- size
-
Size of the file in bytes (Int).
- attrib
-
Attribute flags of the matched entry (Int).
- wr_time
-
Time of last modification (Int).
- wr_date
-
Date of last modification (Int).
FUNCTIONS
_dos_findfirst
my $rc = _dos_findfirst($pattern, $attrib, $record);
Initializes a directory search.
- pattern
-
Search pattern, which may include wildcards (Str).
- attrib
-
Attribute mask used to filter matching entries (Int).
- record
-
A directory search record of type
ffblkorfind_tthat will receive the first matching entry.
Returns zero on success. A non-zero value indicates that no matching entry was found.
_dos_findnext
my $rc = _dos_findnext($record);
Advances the directory search to the next matching entry.
- record
-
The directory search record previously initialized by
_dos_findfirst.
Returns zero on success. A non-zero value indicates that no further matching entries are available.
SEE ALSO
TUI::StdDlg::DirCollection, TUI::StdDlg::DirListBox, TUI::StdDlg::ChDirDialog
AUTHORS
- Borland International (original Turbo Vision design)
- J. Schneider <brickpool@cpan.org> (Perl implementation and maintenance)
CONTRIBUTORS
COPYRIGHT AND LICENSE
Copyright (c) 1987, 1993 by Borland International
Copyright (c) 2019-2026 the "AUTHORS" and "CONTRIBUTORS" as listed above.
This software is licensed under the MIT license (see the LICENSE file, which is part of the distribution).