Dos unit
DOS - Turbo Pascal MS-DOS interface.
The DOS unit gives access to some operating system calls
related to files, the file system, date and time. Except for the
PalmOS target, this unit is available to all supported platforms.
The unit was first written for Dos by Florian Klaempfl. It was ported to Linux by Mark May and enhanced by Michael Van Canneyt. The Amiga version was ported by Nils Sjoholm.
Under non-DOS systems, some of the functionality is lost, as it is either impossible or meaningless to implement it. Other than that, the functionality is the same for all operating systems.
Because the DOS unit is a Turbo Pascal compatibility unit, it is no longer actively developed: the interface is frozen and it is maintained only for the purpose of porting Turbo Pascal programs. For new development, it is recommended to use the sysutils unit instead.
Classes and records
DateTime | record | Record containing a date/time description. |
Registers | record | Record to keep CPU registers for call. Unused. |
SearchRec | record | File Search Results record. |
Procedures and functions
AddDisk | function | Add disk definition to list if drives (Unix only). |
DiskFree | function | Get free size on Disk. |
DiskSize | function | Get total size of disk. |
DosExitCode | function | Exit code of last executed program. |
DosVersion | function | Current OS version. |
DTToUnixDate | function | Convert a DateTime to Unix timestamp. |
EnvCount | function | Return the number of environment variables. |
EnvStr | function | Return environment variable by index. |
Exec | procedure | Execute another program, and wait for it to finish. |
FExpand | function | Expand a relative path to an absolute path. |
FindClose | procedure | Dispose resources allocated by a / sequence. |
FindFirst | procedure | Start search for one or more files. |
FindNext | procedure | Find next matching file after . |
FSearch | function | Search a file in searchpath. |
FSplit | procedure | Split a full-path filename in parts. |
GetCBreak | procedure | Get control-Break flag. |
GetDate | procedure | Get the current date. |
GetEnv | function | Get environment variable by name. |
GetFAttr | procedure | Get file attributes. |
GetFTime | procedure | Get file last modification time. |
GetIntVec | procedure | Get interrupt vector. |
GetLongName | function | Get the long filename of a DOS 8.3 filename. |
GetMsCount | function | Number of milliseconds since a starting point. |
GetShortName | function | Get the short (8.3) filename of a long filename. |
GetTime | procedure | Return the current time. |
GetVerify | procedure | Get verify flag. |
Intr | procedure | Execute interrupt. |
Keep | procedure | Terminate and stay resident. |
MSDos | procedure | Execute MS-DOS system call. |
PackTime | procedure | Pack DateTime value to a packed-time format. |
SetCBreak | procedure | Set Control-Break flag status. |
SetDate | procedure | Set system date. |
SetFAttr | procedure | Set file attributes. |
SetFTime | procedure | Set file modification time. |
SetIntVec | procedure | Set interrupt vector. |
SetTime | procedure | Set system time. |
SetVerify | procedure | Set verify flag. |
SwapVectors | procedure | Swap interrupt vectors. |
UnixDateToDt | procedure | Convert a Unix timestamp to a DateTime record. |
UnpackTime | procedure | Unpack packed file time to a DateTime value. |
weekday | function | Return the day of the week. |
Types
ComStr | type | Command-line string type. |
DirStr | type | Full directory string type. |
ExtStr | type | Filename extension string type. |
NameStr | type | Fill filename string type. |
PathStr | type | Full File path string type. |
Constants
anyfile | constant | Match any file attribute. |
archive | constant | Archive file attribute. |
directory | constant | Directory file attribute. |
fauxiliary | constant | CPU auxiliary flag. Not used. |
fcarry | constant | CPU carry flag. Not used. |
FileNameLen | constant | Maximum length of a filename. |
fmclosed | constant | File is closed. |
fminout | constant | File is read and write. |
fminput | constant | File is read only. |
fmoutput | constant | File is write only. |
foverflow | constant | CPU overflow flag. Not used. |
fparity | constant | CPU parity flag. Not used. |
fsign | constant | CPU sign flag. Not used. |
fzero | constant | CPU zero flag. Not used. |
hidden | constant | Hidden file attribute. |
readonly | constant | Read-Only file attribute. |
sysfile | constant | System file attribute. |
volumeid | constant | Volume ID file attribute. |
Variables
DosError | variable | Last OS (MS-DOS) error. |
Topics
diskhandling | topic | Directory and disk handling. |
fileattributes | topic | File attributes. |
filehandling | topic | File handling. |
filemodes | topic | File open mode constants. |
process | topic | Process handling. |
sysinfo | topic | System information. |
Uses
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
