mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 19:08:18 +02:00
26 lines
555 B
ObjectPascal
26 lines
555 B
ObjectPascal
{ %opt=-gh }
|
|
|
|
{$mode objfpc}
|
|
|
|
uses Dos;
|
|
|
|
var
|
|
DiskNum: Byte;
|
|
begin
|
|
HaltOnNotReleased := true;
|
|
Writeln(DiskFree(3), '/', DiskSize(3));
|
|
|
|
{ Now get disk / by AddDisk. DiskFree and DiskSize below should return
|
|
the same (well, assuming that nothing was writeen to disk between
|
|
calls...). }
|
|
{$ifdef unix}
|
|
DiskNum := AddDisk('/');
|
|
{$else}
|
|
{ dos/windows/os/2 ... Still needs other cases for other OSes }
|
|
DiskNum := 3;
|
|
{$endif}
|
|
Writeln(DiskFree(DiskNum), '/', DiskSize(DiskNum));
|
|
if (disksize(3)<>disksize(disknum)) then
|
|
halt(1);
|
|
end.
|