Examples Delphi

This article shows how to detect if a disk is in the specified drive.
function IsDriveReady(Drive: Char): Boolean;
begin
Result := FileExists(Drive + ':\nul');
end;