From bb035c1e54d3186189215831766c1cf2227bd1ba Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 11 May 2016 09:27:13 +0200 Subject: systemunit.pas: pwd neu --- systemunit.pas | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/systemunit.pas b/systemunit.pas index 5341b39..1d28924 100644 --- a/systemunit.pas +++ b/systemunit.pas @@ -18,6 +18,7 @@ procedure shellExpand(s: string; out sa: tMyStringList); overload; procedure shellExpand(var sa: tMyStringList); overload; function mkTemp(s: string): string; function myReadLink(s: string): string; +function pwd: string; implementation @@ -247,6 +248,18 @@ begin result:=''; if not runCommand('readlink',args,result) then raise exception.create('Fehler beim Ausführen von ''readlink -f -n '+s+'''!'); + result:=trim(result); +end; + +function pwd: string; +var + args: array of string; +begin + setlength(args,0); + result:=''; + if not runCommand('pwd',args,result) then + raise exception.create('Fehler beim Ausführen von ''pwd''!'); + result:=trim(result); end; begin -- cgit v1.2.3-70-g09d2