Ich versuche mir eine Routine zu schreiben, welche mir die Laufwerkpfade im System gibt.
Für Linux hab ich schon was im Forum gefunden ( viewtopic.php?f=10&t=438 ) und daraus das hier gemacht.
Code: Alles auswählen
Function GetDriveLetters(): TStringList;
{$IFDEF LINUX}
Var
tmpl: TStringlist;
i: integer;
s: String;
{$ENDIF}
Begin
result := TStringList.Create;
result.clear;
{$IFDEF LINUX}
tmpl := TStringlist.Create;
tmpl.LoadFromFile('/etc/mtab');
For i := 0 To tmpl.count - 1 Do Begin
s := copy(tmpl[i], 1, pos(' ', tmpl[i]) - 1);
If (length(s) <> 0) And (s[1] = '/') Then Begin
result.Add(s);
End;
End;
tmpl.free;
{$ENDIF}
{$IFDEF WIN32}
{$ENDIF}
End;
Wie ihr sehen könnt fehlt noch die Rubrik Windows, könnt ihr mir hier weiter helfen ?