[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Return the current directory
Source position: systemh.inc line 1370
procedure GetDir( |
drivenr: Byte; |
var dir: shortstring |
); overload; |
drivenr: Byte; |
var dir: RawByteString |
); overload; |
drivenr: Byte; |
var dir: unicodestring |
); overload; |
Getdir returns in dir the current directory on the drive drivenr, where {drivenr} is 1 for the first floppy drive, 3 for the first hard disk etc. A value of 0 returns the directory on the current disk. On Linux and Unix systems, drivenr is ignored, as there is only one directory tree.
An error is returned under dos, if the drive requested isn't ready.
|
Change current working directory. |
Program Example29; { Program to demonstrate the GetDir function. } Var S : String; begin GetDir (0,S); Writeln ('Current directory is : ',S); end.